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>2018-10-19 01:07:40 +0300
committerCampbell Barton <ideasman42@gmail.com>2018-10-19 01:18:22 +0300
commita30c9f710a64d0adca1597c0d0404713a26a401e (patch)
tree40fc7724b8a362dc08745ad766e6ee7e025479db /source/blender/blenlib/intern/math_geom.c
parent642b77e874e787b04e28dc68af3ac4bd7aed5b2e (diff)
Partial revert '#if 0' cleanup
Partially revert 41216d5ad4c722e2ad9f15c968af454fc7566d5e Some of this code had comments to be left as is for readability, or comment the code should be kept. Other functions were only for debugging.
Diffstat (limited to 'source/blender/blenlib/intern/math_geom.c')
-rw-r--r--source/blender/blenlib/intern/math_geom.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/source/blender/blenlib/intern/math_geom.c b/source/blender/blenlib/intern/math_geom.c
index d59d7b4fe6a..eae82ff2f4f 100644
--- a/source/blender/blenlib/intern/math_geom.c
+++ b/source/blender/blenlib/intern/math_geom.c
@@ -534,11 +534,19 @@ float dist_signed_squared_to_corner_v3v3v3(
cross_v3_v3v3(plane_a, dir_a, axis);
cross_v3_v3v3(plane_b, axis, dir_b);
+#if 0
+ plane_from_point_normal_v3(plane_a, v2, plane_a);
+ plane_from_point_normal_v3(plane_b, v2, plane_b);
+
+ dist_a = dist_signed_squared_to_plane_v3(p, plane_a);
+ dist_b = dist_signed_squared_to_plane_v3(p, plane_b);
+#else
/* calculate without the planes 4th component to avoid float precision issues */
sub_v3_v3v3(s_p_v2, p, v2);
dist_a = dist_signed_squared_to_plane3_v3(s_p_v2, plane_a);
dist_b = dist_signed_squared_to_plane3_v3(s_p_v2, plane_b);
+#endif
if (flip) {
return min_ff(dist_a, dist_b);