[Bf-blender-cvs] [c249eb7a8d6] master: Fix new boolean performance bug.
Howard Trickey
noreply at git.blender.org
Sat Oct 31 22:21:41 CET 2020
Commit: c249eb7a8d61e08b7564102a6a97c52ee7ce1595
Author: Howard Trickey
Date: Sat Oct 31 17:21:18 2020 -0400
Branches: master
https://developer.blender.org/rBc249eb7a8d61e08b7564102a6a97c52ee7ce1595
Fix new boolean performance bug.
The code that decided to use a faster double version of plane
side testing forgot to take an absolute value, so half the time
the exact code was being used when it was unnecessary.
===================================================================
M source/blender/blenlib/intern/mesh_intersect.cc
===================================================================
diff --git a/source/blender/blenlib/intern/mesh_intersect.cc b/source/blender/blenlib/intern/mesh_intersect.cc
index c36dfa80be7..a777833dff4 100644
--- a/source/blender/blenlib/intern/mesh_intersect.cc
+++ b/source/blender/blenlib/intern/mesh_intersect.cc
@@ -1550,7 +1550,7 @@ static int filter_plane_side(const double3 &p,
}
double supremum = double3::dot(abs_p + abs_plane_p, abs_plane_no);
double err_bound = supremum * index_plane_side * DBL_EPSILON;
- if (d > err_bound) {
+ if (fabs(d) > err_bound) {
return d > 0 ? 1 : -1;
}
return 0;
More information about the Bf-blender-cvs
mailing list