Blender-Internal: avoid redundant area check

This commit is contained in:
Campbell Barton 2015-01-13 19:08:08 +11:00
parent 3debcc8b51
commit 98ad7c21c0
1 changed files with 7 additions and 6 deletions

View File

@ -2721,12 +2721,13 @@ static void init_render_curve(Render *re, ObjectRen *obr, int timeoffset)
vlr->v4= NULL;
/* to prevent float accuracy issues, we calculate normal in local object space (not world) */
if (area_tri_v3(co3, co2, co1)>FLT_EPSILON) {
if (negative_scale)
normal_tri_v3(tmp, co1, co2, co3);
else
normal_tri_v3(tmp, co3, co2, co1);
add_v3_v3(n, tmp);
if (normal_tri_v3(tmp, co1, co2, co3) > FLT_EPSILON) {
if (negative_scale == false) {
add_v3_v3(n, tmp);
}
else {
sub_v3_v3(n, tmp);
}
}
vlr->mat= matar[ dl->col ];