diff options
author | Campbell Barton <ideasman42@gmail.com> | 2010-04-12 04:36:50 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2010-04-12 04:36:50 +0400 |
commit | 8c3ab1c2a40c17901546575adda3eba5d76b25ba (patch) | |
tree | ea7c1febdbc344c7173a8f9936156b98e680fa47 /source/blender/modifiers/intern/MOD_uvproject.c | |
parent | 7d9898229582b44a525c5752550a2494adaa4fd6 (diff) |
- use more inline math funcitons where possible
- swapped in less verbose math functons
- modifier include cleanup
Diffstat (limited to 'source/blender/modifiers/intern/MOD_uvproject.c')
-rw-r--r-- | source/blender/modifiers/intern/MOD_uvproject.c | 63 |
1 files changed, 15 insertions, 48 deletions
diff --git a/source/blender/modifiers/intern/MOD_uvproject.c b/source/blender/modifiers/intern/MOD_uvproject.c index 782e7f478d9..f71e1c1f07d 100644 --- a/source/blender/modifiers/intern/MOD_uvproject.c +++ b/source/blender/modifiers/intern/MOD_uvproject.c @@ -32,54 +32,21 @@ #include "stddef.h" #include "string.h" -#include "stdarg.h" #include "math.h" #include "float.h" -#include "BLI_kdtree.h" -#include "BLI_rand.h" +#include "BLI_math.h" #include "BLI_uvproject.h" -#include "MEM_guardedalloc.h" - -#include "DNA_armature_types.h" +#include "DNA_object_types.h" #include "DNA_camera_types.h" -#include "DNA_curve_types.h" -#include "DNA_key_types.h" -#include "DNA_material_types.h" -#include "DNA_object_fluidsim.h" - - -#include "BKE_action.h" -#include "BKE_bmesh.h" -#include "BKE_cloth.h" -#include "BKE_cdderivedmesh.h" -#include "BKE_displist.h" -#include "BKE_fluidsim.h" -#include "BKE_global.h" -#include "BKE_multires.h" -#include "BKE_key.h" -#include "BKE_lattice.h" -#include "BKE_material.h" -#include "BKE_mesh.h" -#include "BKE_modifier.h" -#include "BKE_object.h" -#include "BKE_paint.h" -#include "BKE_particle.h" -#include "BKE_pointcache.h" -#include "BKE_scene.h" -#include "BKE_smoke.h" -#include "BKE_softbody.h" -#include "BKE_subsurf.h" -#include "BKE_texture.h" - -#include "depsgraph_private.h" -#include "BKE_deform.h" -#include "BKE_shrinkwrap.h" +#include "DNA_meshdata_types.h" +#include "DNA_customdata_types.h" -#include "CCGSubSurf.h" +#include "MEM_guardedalloc.h" -#include "RE_shader_ext.h" +#include "BKE_DerivedMesh.h" +#include "depsgraph_private.h" #include "MOD_modifiertypes.h" #include "MOD_util.h" @@ -152,7 +119,7 @@ static void foreachIDLink(ModifierData *md, Object *ob, } static void updateDepgraph(ModifierData *md, - DagForest *forest, Scene *scene, Object *ob, DagNode *obNode) + DagForest *forest, struct Scene *scene, Object *ob, DagNode *obNode) { UVProjectModifierData *umd = (UVProjectModifierData*) md; int i; @@ -368,16 +335,16 @@ static DerivedMesh *uvprojectModifier_do(UVProjectModifierData *umd, Projector *best_projector; float best_dot; - VECCOPY(co1, coords[mf->v1]); - VECCOPY(co2, coords[mf->v2]); - VECCOPY(co3, coords[mf->v3]); + copy_v3_v3(co1, coords[mf->v1]); + copy_v3_v3(co2, coords[mf->v2]); + copy_v3_v3(co3, coords[mf->v3]); /* get the untransformed face normal */ if(mf->v4) { - VECCOPY(co4, coords[mf->v4]); - normal_quad_v3( face_no,co1, co2, co3, co4); + copy_v3_v3(co4, coords[mf->v4]); + normal_quad_v3(face_no, co1, co2, co3, co4); } else { - normal_tri_v3( face_no,co1, co2, co3); + normal_tri_v3(face_no, co1, co2, co3); } /* find the projector which the face points at most directly @@ -456,7 +423,7 @@ static DerivedMesh *applyModifier( } static DerivedMesh *applyModifierEM( - ModifierData *md, Object *ob, EditMesh *editData, + ModifierData *md, Object *ob, struct EditMesh *editData, DerivedMesh *derivedData) { return applyModifier(md, ob, derivedData, 0, 1); |