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>2015-09-04 15:04:54 +0300
committerCampbell Barton <ideasman42@gmail.com>2015-09-04 15:13:20 +0300
commit1d71ad2eaa5176ed6ab8ca5bfbeb5f8eb9fa3453 (patch)
treedf95b8ed9109e20a754f1e4de00bcbdbeaff4aa1 /source/blender/python/mathutils/mathutils_geometry.c
parentd0e7ba3fd1a9becfc843eeee1d1f9fffd83f3748 (diff)
Math Lib: Use plane intersect from graphics-gems
Diffstat (limited to 'source/blender/python/mathutils/mathutils_geometry.c')
-rw-r--r--source/blender/python/mathutils/mathutils_geometry.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/source/blender/python/mathutils/mathutils_geometry.c b/source/blender/python/mathutils/mathutils_geometry.c
index 81d000991d0..02247986558 100644
--- a/source/blender/python/mathutils/mathutils_geometry.c
+++ b/source/blender/python/mathutils/mathutils_geometry.c
@@ -530,6 +530,7 @@ static PyObject *M_Geometry_intersect_plane_plane(PyObject *UNUSED(self), PyObje
PyObject *ret, *ret_co, *ret_no;
PyObject *py_plane_a_co, *py_plane_a_no, *py_plane_b_co, *py_plane_b_no;
float plane_a_co[3], plane_a_no[3], plane_b_co[3], plane_b_no[3];
+ float plane_a[4], plane_b[4];
float isect_co[3];
float isect_no[3];
@@ -549,9 +550,12 @@ static PyObject *M_Geometry_intersect_plane_plane(PyObject *UNUSED(self), PyObje
return NULL;
}
- if (isect_plane_plane_v3(isect_co, isect_no,
- plane_a_co, plane_a_no,
- plane_b_co, plane_b_no))
+ plane_from_point_normal_v3(plane_a, plane_a_co, plane_a_no);
+ plane_from_point_normal_v3(plane_b, plane_b_co, plane_b_no);
+
+ if (isect_plane_plane_v3(
+ plane_a, plane_b,
+ isect_co, isect_no))
{
normalize_v3(isect_no);