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:
Diffstat (limited to 'extern/bullet/LinearMath/AabbUtil2.h')
-rw-r--r--extern/bullet/LinearMath/AabbUtil2.h9
1 files changed, 5 insertions, 4 deletions
diff --git a/extern/bullet/LinearMath/AabbUtil2.h b/extern/bullet/LinearMath/AabbUtil2.h
index 77271e13202..fd30fdcb35f 100644
--- a/extern/bullet/LinearMath/AabbUtil2.h
+++ b/extern/bullet/LinearMath/AabbUtil2.h
@@ -39,10 +39,11 @@ DEALINGS IN THE SOFTWARE.
SIMD_FORCE_INLINE bool TestAabbAgainstAabb2(const SimdVector3 &aabbMin1, const SimdVector3 &aabbMax1,
const SimdVector3 &aabbMin2, const SimdVector3 &aabbMax2)
{
- if (aabbMin1[0] > aabbMax2[0] || aabbMax1[0] < aabbMin2[0]) return false;
- if (aabbMin1[2] > aabbMax2[2] || aabbMax1[2] < aabbMin2[2]) return false;
- if (aabbMin1[1] > aabbMax2[1] || aabbMax1[1] < aabbMin2[1]) return false;
- return true;
+ bool overlap = true;
+ overlap = (aabbMin1[0] > aabbMax2[0] || aabbMax1[0] < aabbMin2[0]) ? false : overlap;
+ overlap = (aabbMin1[2] > aabbMax2[2] || aabbMax1[2] < aabbMin2[2]) ? false : overlap;
+ overlap = (aabbMin1[1] > aabbMax2[1] || aabbMax1[1] < aabbMin2[1]) ? false : overlap;
+ return overlap;
}
/// conservative test for overlap between triangle and aabb