namespace Geometry {
template<typename T, unsigned D>
-class TransformedShape
+class TransformedShape: public Shape<T, D>
{
private:
Shape<T, D> *shape;
const Shape<T, D> &get_shape() const { return *shape; }
const AffineTransformation<T, D> &get_transformation() const { return transformation; }
+ virtual HyperBox<T, D> get_axis_aligned_bounding_box() const;
virtual bool check_intersection(const Ray<T, D> &) const;
};
return new TransformedShape<T, D>(*this);
}
+template<typename T, unsigned D>
+inline HyperBox<T, D> TransformedShape<T, D>::get_axis_aligned_bounding_box() const
+{
+ // XXX This is not correct for most shapes
+ return shape->get_axis_aligned_bounding_box();
+}
+
template<typename T, unsigned D>
inline bool TransformedShape<T, D>::check_intersection(const Ray<T, D> &ray) const
{