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-06-24 00:14:33 +0300
committerCampbell Barton <ideasman42@gmail.com>2015-06-24 00:21:11 +0300
commitf1bad1d16b1c2ac2c38bf0adb774d1362b646fbf (patch)
tree2424ebc85ddccc7db82bdca1beb109252bea7fcf /source/blender/blenlib/BLI_math_geom.h
parent40a345a9c75259216c158ec509e756c4d3f19fd5 (diff)
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.
Diffstat (limited to 'source/blender/blenlib/BLI_math_geom.h')
-rw-r--r--source/blender/blenlib/BLI_math_geom.h6
1 files changed, 6 insertions, 0 deletions
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]);