]> git.tdb.fi Git - libs/math.git/blobdiff - source/geometry/negation.h
Use the coverage function to calculate tighter bounding boxes
[libs/math.git] / source / geometry / negation.h
index d90c4deb5a7de767b2f36cb0ed165d53f8a5c851..91802f8bce9906cfdadcae3bc7382c6e193cb423 100644 (file)
@@ -26,7 +26,7 @@ public:
 
        const Shape<T, D> &get_shape() const { return *shape; }
 
-       virtual BoundingBox<T, D> get_axis_aligned_bounding_box() const;
+       virtual BoundingBox<T, D> get_axis_aligned_bounding_box(unsigned = 0) const;
        virtual bool contains(const LinAl::Vector<T, D> &) const;
        virtual unsigned get_max_ray_intersections() const { return shape->get_max_ray_intersections(); }
        virtual unsigned get_intersections(const Ray<T, D> &, SurfacePoint<T, D> *, unsigned) const;
@@ -64,9 +64,9 @@ inline Negation<T, D> *Negation<T, D>::clone() const
 }
 
 template<typename T, unsigned D>
-inline BoundingBox<T, D> Negation<T, D>::get_axis_aligned_bounding_box() const
+inline BoundingBox<T, D> Negation<T, D>::get_axis_aligned_bounding_box(unsigned detail) const
 {
-       return ~shape->get_axis_aligned_bounding_box();
+       return ~shape->get_axis_aligned_bounding_box(detail);
 }
 
 template<typename T, unsigned D>