]> git.tdb.fi Git - libs/math.git/blobdiff - source/geometry/hyperbox.h
Use the coverage function to calculate tighter bounding boxes
[libs/math.git] / source / geometry / hyperbox.h
index c3bac57d97e3464d20535a66928106079777801a..e3236e8cfaf03d69877fdfe94f7a75dc8e9f811e 100644 (file)
@@ -29,7 +29,7 @@ public:
        const LinAl::Vector<T, D> &get_dimensions() const { return dimensions; }
        T get_dimension(unsigned) const;
 
-       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 2; }
        virtual unsigned get_intersections(const Ray<T, D> &, SurfacePoint<T, D> *, unsigned) const;
@@ -65,7 +65,7 @@ inline T HyperBox<T, D>::get_dimension(unsigned i) const
 }
 
 template<typename T, unsigned D>
-inline BoundingBox<T, D> HyperBox<T, D>::get_axis_aligned_bounding_box() const
+inline BoundingBox<T, D> HyperBox<T, D>::get_axis_aligned_bounding_box(unsigned) const
 {
        LinAl::Vector<T, D> half_dim = dimensions/T(2);
        return BoundingBox<T, D>(-half_dim, half_dim);