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>2020-11-07 12:14:40 +0300
committerCampbell Barton <ideasman42@gmail.com>2020-11-07 13:01:42 +0300
commit19a0df25e36d9e75d486e8c51ccb874095a93e91 (patch)
tree709474ad534da48c6c4636bee3e6930c885bc731 /source/blender/blenlib/BLI_math_geom.h
parentd2c102060d4489aa1fd68f6c33df4ba9c4add78b (diff)
Cleanup: move plane array intersection into a function
Also add check to ensure a point isn't occluded by it's own plane, which could happen if a small epsilon values are passed in.
Diffstat (limited to 'source/blender/blenlib/BLI_math_geom.h')
-rw-r--r--source/blender/blenlib/BLI_math_geom.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/source/blender/blenlib/BLI_math_geom.h b/source/blender/blenlib/BLI_math_geom.h
index a9a55b10a9e..c0a9ea91e75 100644
--- a/source/blender/blenlib/BLI_math_geom.h
+++ b/source/blender/blenlib/BLI_math_geom.h
@@ -358,6 +358,14 @@ bool isect_plane_plane_v3(const float plane_a[4],
float r_isect_co[3],
float r_isect_no[3]) ATTR_WARN_UNUSED_RESULT;
+bool isect_planes_v3_fn(
+ const float planes[][4],
+ const int planes_len,
+ const float eps_coplanar,
+ const float eps_isect,
+ void (*callback_fn)(const float co[3], int i, int j, int k, void *user_data),
+ void *user_data);
+
/* line/ray triangle */
bool isect_line_segment_tri_v3(const float p1[3],
const float p2[3],