X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fgeometry%2Fnegation.h;h=c01763d1c8eed6fa399090c27210e51c54553a20;hb=3d124f6903553a9fc54341aba1b6f565c6d442f2;hp=6746aed113f487618e0e7f254f088fd8bdc2289e;hpb=313e10c1dcf5504789cc145166aece93d8141212;p=libs%2Fmath.git diff --git a/source/geometry/negation.h b/source/geometry/negation.h index 6746aed..c01763d 100644 --- a/source/geometry/negation.h +++ b/source/geometry/negation.h @@ -23,7 +23,7 @@ public: const Shape &get_shape() const { return *shape; } - virtual HyperBox get_axis_aligned_bounding_box() const; + virtual BoundingBox get_axis_aligned_bounding_box() const; virtual bool contains(const LinAl::Vector &) const; virtual unsigned get_max_ray_intersections() const { return shape->get_max_ray_intersections(); } virtual unsigned get_intersections(const Ray &, SurfacePoint *, unsigned) const; @@ -41,10 +41,9 @@ inline Negation *Negation::clone() const } template -inline HyperBox Negation::get_axis_aligned_bounding_box() const +inline BoundingBox Negation::get_axis_aligned_bounding_box() const { - // XXX How do we handle this correctly? In particular negation of a negation? - return HyperBox(); + return ~shape->get_axis_aligned_bounding_box(); } template