X-Git-Url: http://git.tdb.fi/?p=libs%2Fmath.git;a=blobdiff_plain;f=source%2Fgeometry%2Fnegation.h;h=beb3e4e7b845d91edcaff45555add550a8165cd3;hp=6746aed113f487618e0e7f254f088fd8bdc2289e;hb=09cc3a8648dd20e9a07d669b353c4a120b67c1c4;hpb=f7dcf3f0be55316bf20ac0c318dd90cb78a75c80 diff --git a/source/geometry/negation.h b/source/geometry/negation.h index 6746aed..beb3e4e 100644 --- a/source/geometry/negation.h +++ b/source/geometry/negation.h @@ -1,6 +1,7 @@ #ifndef MSP_GEOMETRY_NEGATION_H_ #define MSP_GEOMETRY_NEGATION_H_ +#include "boundingbox.h" #include "shape.h" namespace Msp { @@ -23,7 +24,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 +42,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