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>2012-05-13 15:05:52 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-05-13 15:05:52 +0400
commit305d341ec2c2c5c6485ad6cd719e9472e4bb460d (patch)
treefa4c658ad417869a0ed2e7ef5f37ca94adb2cc3b /source/blender/modifiers
parent13bbf1cc7b0a620173475172278d2f8eb9593ccd (diff)
code cleanup: use vector math function minmax_v3v3_v3() and other minor vector function edits.
Diffstat (limited to 'source/blender/modifiers')
-rw-r--r--source/blender/modifiers/intern/MOD_cast.c6
-rw-r--r--source/blender/modifiers/intern/MOD_solidify.c7
2 files changed, 6 insertions, 7 deletions
diff --git a/source/blender/modifiers/intern/MOD_cast.c b/source/blender/modifiers/intern/MOD_cast.c
index c4772895b03..5e791a9f748 100644
--- a/source/blender/modifiers/intern/MOD_cast.c
+++ b/source/blender/modifiers/intern/MOD_cast.c
@@ -367,16 +367,16 @@ static void cuboid_do(
float vec[3];
/* let the center of the ctrl_ob be part of the bound box: */
- DO_MINMAX(center, min, max);
+ minmax_v3v3_v3(min, max, center);
for (i = 0; i < numVerts; i++) {
sub_v3_v3v3(vec, vertexCos[i], center);
- DO_MINMAX(vec, min, max);
+ minmax_v3v3_v3(min, max, vec);
}
}
else {
for (i = 0; i < numVerts; i++) {
- DO_MINMAX(vertexCos[i], min, max);
+ minmax_v3v3_v3(min, max, vertexCos[i]);
}
}
diff --git a/source/blender/modifiers/intern/MOD_solidify.c b/source/blender/modifiers/intern/MOD_solidify.c
index 264d84af81e..0ca4d8dcd4f 100644
--- a/source/blender/modifiers/intern/MOD_solidify.c
+++ b/source/blender/modifiers/intern/MOD_solidify.c
@@ -558,9 +558,7 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob,
/* flip vertex normals for copied verts */
mv = mvert + numVerts;
for (i = 0; i < numVerts; i++, mv++) {
- mv->no[0] = -mv->no[0];
- mv->no[1] = -mv->no[1];
- mv->no[2] = -mv->no[2];
+ negate_v3_short(mv->no);
}
if (smd->flag & MOD_SOLIDIFY_RIM) {
@@ -692,7 +690,8 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob,
}
#ifdef SOLIDIFY_SIDE_NORMALS
- normal_quad_v3(nor, mvert[ml[j - 4].v].co,
+ normal_quad_v3(nor,
+ mvert[ml[j - 4].v].co,
mvert[ml[j - 3].v].co,
mvert[ml[j - 2].v].co,
mvert[ml[j - 1].v].co);