]> git.tdb.fi Git - libs/math.git/blobdiff - source/geometry/union.h
Optimize bounding box bisection with more early culling
[libs/math.git] / source / geometry / union.h
index a1562cb4e6b458b55003d981b5898c0c7ded2f25..8c02f2b808dc8a18301653c77e8175e83b2ea555 100644 (file)
@@ -10,11 +10,8 @@ template<typename T, unsigned D>
 struct UnionOps
 {
        static BoundingBox<T, D> combine_aabb(const BoundingBox<T, D> &a, const BoundingBox<T, D> &b) { return a|b; }
-       static bool init_inside() { return false; }
-       static bool combine_inside(bool a, bool b) { return a || b; }
-       static bool is_inside_decided(bool a) { return a; }
-       static bool init_surface() { return true; }
-       static bool combine_surface(bool a, bool b) { return a && !b; }
+       static Coverage combine_coverage(Coverage a, Coverage b) { return std::max(a, b); }
+       static bool shortcircuit(bool c) { return c; }
 };
 
 /**