X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fgeometry%2Ftransformedshape.h;h=91790fc77276fd8aedbb75f318b856d775334cd2;hb=a29d2c17ca70a3ed5df1e863c92ccd851d5dba6b;hp=6a14b0b75a1951f69a72cc9c3034fb56161dfc49;hpb=4bb4d03d5a6a0252083d6bc45b8a50fe7b504c51;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