Tag Info

New answers tagged


You have listed many valid alternatives, however the straightforward one is missing: Just return the count of intersections, and return the points via an array argument. The array argument, of course, has a size to fit the maximum count of intersections. Something like this: size_t getIntersections(const Sphere& sphere, const Ray& ray, ...

Top 50 recent answers are included