diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-10-23 20:21:55 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-10-23 20:21:55 +0400 |
commit | fec81d9b56075f46f6dde196ac85140872cff74e (patch) | |
tree | 6ee12fcc0b04ba3041f1b7e4d17281136375beb1 /source/blender/render/intern/raytrace | |
parent | c623ba5e4b2aa68a5717ba17500c14217bc417aa (diff) |
use min_ max_ functions in more places.
also fix minor error in MOD decimate when the modifier did nothing the reported face count would be wrong.
Diffstat (limited to 'source/blender/render/intern/raytrace')
-rw-r--r-- | source/blender/render/intern/raytrace/rayobject_rtbuild.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/source/blender/render/intern/raytrace/rayobject_rtbuild.cpp b/source/blender/render/intern/raytrace/rayobject_rtbuild.cpp index 3ca21e14e4e..a08edd3fdb7 100644 --- a/source/blender/render/intern/raytrace/rayobject_rtbuild.cpp +++ b/source/blender/render/intern/raytrace/rayobject_rtbuild.cpp @@ -348,12 +348,12 @@ int rtbuild_heuristic_object_split(RTBuilder *b, int nchilds) sweep[i].cost = obj[i]->cost; } else { - sweep[i].bb[0] = MIN2(obj[i]->bb[0], sweep[i + 1].bb[0]); - sweep[i].bb[1] = MIN2(obj[i]->bb[1], sweep[i + 1].bb[1]); - sweep[i].bb[2] = MIN2(obj[i]->bb[2], sweep[i + 1].bb[2]); - sweep[i].bb[3] = MAX2(obj[i]->bb[3], sweep[i + 1].bb[3]); - sweep[i].bb[4] = MAX2(obj[i]->bb[4], sweep[i + 1].bb[4]); - sweep[i].bb[5] = MAX2(obj[i]->bb[5], sweep[i + 1].bb[5]); + sweep[i].bb[0] = min_ff(obj[i]->bb[0], sweep[i + 1].bb[0]); + sweep[i].bb[1] = min_ff(obj[i]->bb[1], sweep[i + 1].bb[1]); + sweep[i].bb[2] = min_ff(obj[i]->bb[2], sweep[i + 1].bb[2]); + sweep[i].bb[3] = max_ff(obj[i]->bb[3], sweep[i + 1].bb[3]); + sweep[i].bb[4] = max_ff(obj[i]->bb[4], sweep[i + 1].bb[4]); + sweep[i].bb[5] = max_ff(obj[i]->bb[5], sweep[i + 1].bb[5]); sweep[i].cost = obj[i]->cost + sweep[i + 1].cost; } // right_cost += obj[i]->cost; |