From 421d0f3bdea56ef056372476a24b1fc5e5ee06e5 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Mon, 16 Feb 2015 18:47:15 +1100 Subject: Math Lib: add dist_signed_squared_to_corner_v3v3v3 Can be used to check if a point is inside the 2-planes defined by a face-corner. --- source/blender/blenlib/BLI_math_geom.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'source/blender/blenlib/BLI_math_geom.h') diff --git a/source/blender/blenlib/BLI_math_geom.h b/source/blender/blenlib/BLI_math_geom.h index 495aa6b2465..f9cce27b1cb 100644 --- a/source/blender/blenlib/BLI_math_geom.h +++ b/source/blender/blenlib/BLI_math_geom.h @@ -104,6 +104,10 @@ float dist_squared_to_line_segment_v3(const float p[3], const float l1[3], const float dist_to_line_segment_v3(const float p[3], const float l1[3], const float l2[3]); float dist_squared_to_line_v3(const float p[3], const float l1[3], const float l2[3]); float dist_to_line_v3(const float p[3], const float l1[3], const float l2[3]); +float dist_signed_squared_to_corner_v3v3v3( + const float p[3], + const float v1[3], const float v2[3], const float v3[3], + const float axis_fallback[3]); 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]); -- cgit v1.2.3