X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;ds=sidebyside;f=source%2Fgeometry%2Fhalfspace.h;h=60f040350b0f63ac3ac48409701db028cece4353;hb=09cc3a8648dd20e9a07d669b353c4a120b67c1c4;hp=9ed80ff71b85052e6525bb46fb800f775c04fe3f;hpb=f7dcf3f0be55316bf20ac0c318dd90cb78a75c80;p=libs%2Fmath.git diff --git a/source/geometry/halfspace.h b/source/geometry/halfspace.h index 9ed80ff..60f0403 100644 --- a/source/geometry/halfspace.h +++ b/source/geometry/halfspace.h @@ -1,6 +1,7 @@ #ifndef MSP_GEOMETRY_HALFSPACE_H_ #define MSP_GEOMETRY_HALFSPACE_H_ +#include "boundingbox.h" #include "shape.h" namespace Msp { @@ -24,7 +25,7 @@ public: const LinAl::Vector &get_normal() const { return normal; } - 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 1; } virtual unsigned get_intersections(const Ray &, SurfacePoint *, unsigned) const; @@ -48,10 +49,10 @@ inline HalfSpace *HalfSpace::clone() const } template -inline HyperBox HalfSpace::get_axis_aligned_bounding_box() const +inline BoundingBox HalfSpace::get_axis_aligned_bounding_box() const { - // XXX Implement this properly - return HyperBox(); + // XXX If the normal is aligned to an axis, should the bounding box reflect that? + return ~BoundingBox(); } template