[Bf-blender-cvs] [ba188cf] master: Math Lib: simplify isect_plane_plane_v3
Campbell Barton
noreply at git.blender.org
Sat Sep 5 09:19:58 CEST 2015
Commit: ba188cf98d8387747a2fc389fc51dd459d061b15
Author: Campbell Barton
Date: Sat Sep 5 17:06:12 2015 +1000
Branches: master
https://developer.blender.org/rBba188cf98d8387747a2fc389fc51dd459d061b15
Math Lib: simplify isect_plane_plane_v3
Unlike the 3 plane method, the 2 planes squared cross-product _is_ the determinant.
===================================================================
M source/blender/blenlib/intern/math_geom.c
===================================================================
diff --git a/source/blender/blenlib/intern/math_geom.c b/source/blender/blenlib/intern/math_geom.c
index 548aed3..72ae959 100644
--- a/source/blender/blenlib/intern/math_geom.c
+++ b/source/blender/blenlib/intern/math_geom.c
@@ -1617,7 +1617,8 @@ bool isect_plane_plane_v3(
/* direction is simply the cross product */
cross_v3_v3v3(plane_c, plane_a, plane_b);
- det = determinant_m3(UNPACK3(plane_a), UNPACK3(plane_b), UNPACK3(plane_c));
+ /* in this case we don't need to use 'determinant_m3' */
+ det = len_squared_v3(plane_c);
if (det != 0.0f) {
float tmp[3];
More information about the Bf-blender-cvs
mailing list