X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fgeometry%2Fshape.h;h=ded8f13d8b7464b896e8d0510fe8146de2e68a85;hb=a29d2c17ca70a3ed5df1e863c92ccd851d5dba6b;hp=7b1d190b5a762b82c7213a012e58190c7ba8d66c;hpb=313e10c1dcf5504789cc145166aece93d8141212;p=libs%2Fmath.git diff --git a/source/geometry/shape.h b/source/geometry/shape.h index 7b1d190..ded8f13 100644 --- a/source/geometry/shape.h +++ b/source/geometry/shape.h @@ -3,18 +3,19 @@ #include #include +#include "boundingbox.h" +#include "ray.h" +#include "surfacepoint.h" namespace Msp { namespace Geometry { -template -class HyperBox; - -template -class Ray; - -template -class SurfacePoint; +enum Coverage +{ + NO_COVERAGE, + PARTIAL_COVERAGE, + FULL_COVERAGE +}; /** Base class and interface for geometric shapes. Shapes may be bounded or @@ -31,12 +32,13 @@ public: virtual Shape *clone() const = 0; - virtual HyperBox get_axis_aligned_bounding_box() const = 0; + virtual BoundingBox get_axis_aligned_bounding_box() const = 0; virtual bool contains(const LinAl::Vector &) const = 0; bool check_intersection(const Ray &) const; virtual unsigned get_max_ray_intersections() const = 0; virtual unsigned get_intersections(const Ray &, SurfacePoint *, unsigned) const = 0; std::vector > get_intersections(const Ray &) const; + virtual Coverage get_coverage(const BoundingBox &) const = 0; }; template