- T distortion = base_dir.norm();
- Ray<T, D-1> base_ray(LinAl::Vector<T, D-1>(ray_start+ray_direction*offset),
- base_dir, (limit-offset)*distortion);
-
- SurfacePoint<T, D-1> *base_points = 0;
- if(points)
- /* Shamelessly reuse the provided storage. Align to the end of the array
- so processing can start from the first (nearest) point. */
- base_points = reinterpret_cast<SurfacePoint<T, D-1> *>(points+size)-size;
-
- unsigned count = base->get_intersections(base_ray, base_points, size);
- for(unsigned i=0; (n<size && i<count); ++i)