summaryrefslogtreecommitdiffstats
path: root/thirdparty/embree/common/math/bbox.h
diff options
context:
space:
mode:
Diffstat (limited to 'thirdparty/embree/common/math/bbox.h')
-rw-r--r--thirdparty/embree/common/math/bbox.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/thirdparty/embree/common/math/bbox.h b/thirdparty/embree/common/math/bbox.h
index e4eb3df9a4..651b29a8fe 100644
--- a/thirdparty/embree/common/math/bbox.h
+++ b/thirdparty/embree/common/math/bbox.h
@@ -56,6 +56,11 @@ namespace embree
return BBox(min(a.lower, b.lower), max(a.upper, b.upper));
}
+ /*! intersects two boxes */
+ __forceinline static const BBox intersect (const BBox& a, const BBox& b) {
+ return BBox(max(a.lower, b.lower), min(a.upper, b.upper));
+ }
+
/*! enlarge box by some scaling factor */
__forceinline BBox enlarge_by(const float a) const {
return BBox(lower - T(a)*abs(lower), upper + T(a)*abs(upper));