]> git.tdb.fi Git - libs/math.git/blobdiff - source/geometry/transformedshape.h
Make the check_intersection function non-virtual
[libs/math.git] / source / geometry / transformedshape.h
index 5a5cf11e8dab05ded01006b2d21189b7b97dc5c9..02587bfd87877efac86f365d39e1a68e072a7020 100644 (file)
@@ -35,7 +35,6 @@ public:
 private:
        Ray<T, D> make_local_ray(const Ray<T, D> &) const;
 public:
-       virtual bool check_intersection(const Ray<T, D> &) const;
        virtual unsigned get_max_ray_intersections() const { return shape->get_max_ray_intersections(); }
        virtual unsigned get_intersections(const Ray<T, D> &, SurfacePoint<T, D> *, unsigned) const;
 };
@@ -96,12 +95,6 @@ inline Ray<T, D> TransformedShape<T, D>::make_local_ray(const Ray<T, D> &ray) co
        return Ray<T, D>(inverse_trans.transform(ray.get_start()), local_dir, ray.get_limit()*distortion);
 }
 
-template<typename T, unsigned D>
-inline bool TransformedShape<T, D>::check_intersection(const Ray<T, D> &ray) const
-{
-       return shape->check_intersection(make_local_ray(ray));
-}
-
 template<typename T, unsigned D>
 inline unsigned TransformedShape<T, D>::get_intersections(const Ray<T, D> &ray, SurfacePoint<T, D> *points, unsigned size) const
 {