diff options
author | Campbell Barton <ideasman42@gmail.com> | 2013-08-22 19:30:24 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2013-08-22 19:30:24 +0400 |
commit | 2ee6c0ac6b774817d760e1e756e97eea476d412e (patch) | |
tree | a7b0807f16ae5838c981d224d5774f81de8a8e54 /source/blender/blenlib/intern/math_geom_inline.c | |
parent | 29c8d3e20de92577d9067b70c6745bf1f0654e9c (diff) |
add utility functions for dealing with planes
- plane_point_side_v3(), a bit like line_point_side_v2()
- isect_point_planes_v3(), moved from paint_hide.c
functions to convert between point/normal pairs.
- plane_from_point_normal_v3()
- plane_to_point_normal_v3()
Diffstat (limited to 'source/blender/blenlib/intern/math_geom_inline.c')
-rw-r--r-- | source/blender/blenlib/intern/math_geom_inline.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/source/blender/blenlib/intern/math_geom_inline.c b/source/blender/blenlib/intern/math_geom_inline.c index f32b477787b..ac5c0033067 100644 --- a/source/blender/blenlib/intern/math_geom_inline.c +++ b/source/blender/blenlib/intern/math_geom_inline.c @@ -185,4 +185,9 @@ MINLINE int poly_to_tri_count(const int poly_count, const int corner_count) } } +MINLINE float plane_point_side_v3(const float plane[4], const float co[3]) +{ + return dot_v3v3(co, plane) + plane[3]; +} + #endif /* __MATH_GEOM_INLINE_C__ */ |