From f1bad1d16b1c2ac2c38bf0adb774d1362b646fbf Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Wed, 24 Jun 2015 07:14:33 +1000 Subject: Improve dist_***_to_corner_v3v3v3 precision Remove offset before calculating distance. Define 'plane3' to BLI_math, since we often don't need the 4th component. --- source/blender/blenlib/BLI_math_geom.h | 6 ++++++ 1 file changed, 6 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 b7a6f39473b..2c91aca27ef 100644 --- a/source/blender/blenlib/BLI_math_geom.h +++ b/source/blender/blenlib/BLI_math_geom.h @@ -102,6 +102,12 @@ float dist_squared_to_plane_v3(const float p[3], const float plane[4]); float dist_signed_to_plane_v3(const float p[3], const float plane[4]); float dist_to_plane_v3(const float p[3], const float plane[4]); +/* plane3 versions */ +float dist_signed_squared_to_plane3_v3(const float p[3], const float plane[4]); +float dist_squared_to_plane3_v3(const float p[3], const float plane[4]); +float dist_signed_to_plane3_v3(const float p[3], const float plane[4]); +float dist_to_plane3_v3(const float p[3], const float plane[4]); + float dist_squared_to_line_segment_v3(const float p[3], const float l1[3], const float l2[3]); 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]); -- cgit v1.2.3