X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;ds=sidebyside;f=source%2Fgeometry%2Ftransformedshape.h;h=91790fc77276fd8aedbb75f318b856d775334cd2;hb=a29d2c17ca70a3ed5df1e863c92ccd851d5dba6b;hp=6a14b0b75a1951f69a72cc9c3034fb56161dfc49;hpb=7de28b9c89ca4554f5c12746f481f5b385529479;p=libs%2Fmath.git diff --git a/source/geometry/transformedshape.h b/source/geometry/transformedshape.h index 6a14b0b..91790fc 100644 --- a/source/geometry/transformedshape.h +++ b/source/geometry/transformedshape.h @@ -33,6 +33,7 @@ public: 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; + virtual Coverage get_coverage(const BoundingBox &) const; }; template @@ -102,6 +103,12 @@ inline unsigned TransformedShape::get_intersections(const Ray &ray, return count; } +template +inline Coverage TransformedShape::get_coverage(const BoundingBox &bbox) const +{ + return shape->get_coverage(inverse_trans.transform(bbox)); +} + } // namespace Geometry } // namespace Msp