diff options
author | Campbell Barton <ideasman42@gmail.com> | 2015-09-03 18:56:51 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2015-09-03 18:59:44 +0300 |
commit | 54ad5766669a23976b9a9fab379bb44ba740c9be (patch) | |
tree | 7d4b01c4d3c1684ecf5bb2349c5295e657ec0545 /source/blender/blenlib/intern/math_geom.c | |
parent | e709da3def912e6b791b9deb8a2524b98c02fb56 (diff) |
Small tri intersect fails when not normalized
Logic was ok, but would run into precision issues.
Diffstat (limited to 'source/blender/blenlib/intern/math_geom.c')
-rw-r--r-- | source/blender/blenlib/intern/math_geom.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/source/blender/blenlib/intern/math_geom.c b/source/blender/blenlib/intern/math_geom.c index 65625db622d..feb9f7d43ca 100644 --- a/source/blender/blenlib/intern/math_geom.c +++ b/source/blender/blenlib/intern/math_geom.c @@ -1600,8 +1600,9 @@ bool isect_tri_tri_epsilon_v3( BLI_assert((r_i1 != NULL) == (r_i2 != NULL)); - cross_tri_v3(no_a, UNPACK3(tri_pair[0])); - cross_tri_v3(no_b, UNPACK3(tri_pair[1])); + /* normalizing is needed for small triangles T46007 */ + normal_tri_v3(no_a, UNPACK3(tri_pair[0])); + normal_tri_v3(no_b, UNPACK3(tri_pair[1])); if (isect_plane_plane_v3(plane_co, plane_no, t_a0, no_a, t_b0, no_b)) { /** |