Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2011-11-06 19:17:43 +0400
committerCampbell Barton <ideasman42@gmail.com>2011-11-06 19:17:43 +0400
commitec3b0c6a968210512e0c36e1e62eefcbe0cf1ea0 (patch)
tree8539e5cf67d14b2256d3171ffb3d1f22d371bf82 /source/blender/editors/uvedit/uvedit_draw.c
parent0634d8a7458c9fed536f3240edf610587ec63067 (diff)
misc macro --> bli math lib functions
Diffstat (limited to 'source/blender/editors/uvedit/uvedit_draw.c')
-rw-r--r--source/blender/editors/uvedit/uvedit_draw.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/source/blender/editors/uvedit/uvedit_draw.c b/source/blender/editors/uvedit/uvedit_draw.c
index 8a50ec28bd6..0f21aa3759c 100644
--- a/source/blender/editors/uvedit/uvedit_draw.c
+++ b/source/blender/editors/uvedit/uvedit_draw.c
@@ -267,10 +267,10 @@ static void draw_uvs_stretch(SpaceImage *sima, Scene *scene, EditMesh *em, MTFac
#endif
/* uv angles */
- VECSUB2D(av1, tf_uv[3], tf_uv[0]); normalize_v2(av1);
- VECSUB2D(av2, tf_uv[0], tf_uv[1]); normalize_v2(av2);
- VECSUB2D(av3, tf_uv[1], tf_uv[2]); normalize_v2(av3);
- VECSUB2D(av4, tf_uv[2], tf_uv[3]); normalize_v2(av4);
+ sub_v2_v2v2(av1, tf_uv[3], tf_uv[0]); normalize_v2(av1);
+ sub_v2_v2v2(av2, tf_uv[0], tf_uv[1]); normalize_v2(av2);
+ sub_v2_v2v2(av3, tf_uv[1], tf_uv[2]); normalize_v2(av3);
+ sub_v2_v2v2(av4, tf_uv[2], tf_uv[3]); normalize_v2(av4);
/* This is the correct angle however we are only comparing angles
* uvang1 = 90-((angle_normalized_v2v2(av1, av2) * RAD2DEGF(1.0f))-90);*/
@@ -280,10 +280,10 @@ static void draw_uvs_stretch(SpaceImage *sima, Scene *scene, EditMesh *em, MTFac
uvang4 = angle_normalized_v2v2(av4, av1);
/* 3d angles */
- VECSUB(av1, efa->v4->co, efa->v1->co); normalize_v3(av1);
- VECSUB(av2, efa->v1->co, efa->v2->co); normalize_v3(av2);
- VECSUB(av3, efa->v2->co, efa->v3->co); normalize_v3(av3);
- VECSUB(av4, efa->v3->co, efa->v4->co); normalize_v3(av4);
+ sub_v3_v3v3(av1, efa->v4->co, efa->v1->co); normalize_v3(av1);
+ sub_v3_v3v3(av2, efa->v1->co, efa->v2->co); normalize_v3(av2);
+ sub_v3_v3v3(av3, efa->v2->co, efa->v3->co); normalize_v3(av3);
+ sub_v3_v3v3(av4, efa->v3->co, efa->v4->co); normalize_v3(av4);
/* This is the correct angle however we are only comparing angles
* ang1 = 90-((angle_normalized_v3v3(av1, av2) * RAD2DEGF(1.0f))-90);*/
@@ -328,9 +328,9 @@ static void draw_uvs_stretch(SpaceImage *sima, Scene *scene, EditMesh *em, MTFac
#endif
/* uv angles */
- VECSUB2D(av1, tf_uv[2], tf_uv[0]); normalize_v2(av1);
- VECSUB2D(av2, tf_uv[0], tf_uv[1]); normalize_v2(av2);
- VECSUB2D(av3, tf_uv[1], tf_uv[2]); normalize_v2(av3);
+ sub_v2_v2v2(av1, tf_uv[2], tf_uv[0]); normalize_v2(av1);
+ sub_v2_v2v2(av2, tf_uv[0], tf_uv[1]); normalize_v2(av2);
+ sub_v2_v2v2(av3, tf_uv[1], tf_uv[2]); normalize_v2(av3);
/* This is the correct angle however we are only comparing angles
* uvang1 = 90-((angle_normalized_v2v2(av1, av2) * 180.0/M_PI)-90); */
@@ -339,9 +339,9 @@ static void draw_uvs_stretch(SpaceImage *sima, Scene *scene, EditMesh *em, MTFac
uvang3 = angle_normalized_v2v2(av3, av1);
/* 3d angles */
- VECSUB(av1, efa->v3->co, efa->v1->co); normalize_v3(av1);
- VECSUB(av2, efa->v1->co, efa->v2->co); normalize_v3(av2);
- VECSUB(av3, efa->v2->co, efa->v3->co); normalize_v3(av3);
+ sub_v3_v3v3(av1, efa->v3->co, efa->v1->co); normalize_v3(av1);
+ sub_v3_v3v3(av2, efa->v1->co, efa->v2->co); normalize_v3(av2);
+ sub_v3_v3v3(av3, efa->v2->co, efa->v3->co); normalize_v3(av3);
/* This is the correct angle however we are only comparing angles
* ang1 = 90-((angle_normalized_v3v3(av1, av2) * 180.0/M_PI)-90); */
ang1 = angle_normalized_v3v3(av1, av2);