+template<typename T, unsigned D>
+inline bool Shape<T, D>::check_intersection(const Ray<T, D> &ray) const
+{
+ return get_intersections(ray, 0, 1);
+}
+
+template<typename T, unsigned D>
+inline std::vector<SurfacePoint<T, D> > Shape<T, D>::get_intersections(const Ray<T, D> &ray) const
+{
+ unsigned max_isect = get_max_ray_intersections();
+ std::vector<SurfacePoint<T, D> > points(max_isect);
+ unsigned count = get_intersections(ray, &points[0], max_isect);
+ points.resize(count);
+ return points;
+}
+