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-08-31 13:05:49 +0300
committerCampbell Barton <ideasman42@gmail.com>2015-08-31 13:10:36 +0300
commit96fa58e22cde8329bfc5639f9a68c85be9473b1d (patch)
treee08ee7ba170837de7b6171d3553b043667dfeeae /source/blender/blenlib/BLI_math_geom.h
parent489a5d34b7bf84141696e99274a4cbd7425a9b7b (diff)
Math Lib: Add closest_to_plane helper functions
- closest_to_plane3 (for float3 planes) - closest_to_plane*_normalized_v3 (for unit length planes) Use when the plane is known to be unit length
Diffstat (limited to 'source/blender/blenlib/BLI_math_geom.h')
-rw-r--r--source/blender/blenlib/BLI_math_geom.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/source/blender/blenlib/BLI_math_geom.h b/source/blender/blenlib/BLI_math_geom.h
index 1a25f9f897f..c4bb3cc7778 100644
--- a/source/blender/blenlib/BLI_math_geom.h
+++ b/source/blender/blenlib/BLI_math_geom.h
@@ -119,7 +119,10 @@ float dist_signed_squared_to_corner_v3v3v3(
float closest_to_line_v3(float r[3], const float p[3], const float l1[3], const float l2[3]);
float closest_to_line_v2(float r[2], const float p[2], const float l1[2], const float l2[2]);
void closest_to_line_segment_v3(float r_close[3], const float p[3], const float l1[3], const float l2[3]);
+void closest_to_plane_normalized_v3(float r_close[3], const float plane[4], const float pt[3]);
void closest_to_plane_v3(float r_close[3], const float plane[4], const float pt[3]);
+void closest_to_plane3_normalized_v3(float r_close[3], const float plane[3], const float pt[3]);
+void closest_to_plane3_v3(float r_close[3], const float plane[3], const float pt[3]);
/* Set 'r' to the point in triangle (t1, t2, t3) closest to point 'p' */
void closest_on_tri_to_point_v3(float r[3], const float p[3], const float t1[3], const float t2[3], const float t3[3]);