The API would not provide the capacity to type the intersections or get a listing of them, you solely get one intersection outcome or dedicated intersection, however you may most likely do one thing alongside the next strains.
This isn’t actually API particular. First you discover the closest intersection, then spawning a brand new ray at that time, till you run out of issues to intersect. You would wish to configure your question and intersector relying on whether or not you need backface intersections, but in addition you might want to set accept_any_intersection
to false.
In case you spawn the subsequent ray precisely on the intersection level, there’s an opportunity that it’ll self-intersect. The plain means of simply rising min_distance
on the ray is just not actually right. The simple means is to offset the ray origin alongside the geometry regular on the level of intersection. However the easiest way is described in a paper referred to as “A Quick and Sturdy Technique for Avoiding Self-Intersection by Carsten Wächter and Nikolaus Binder NVIDIA“