Closed Mateasek closed 5 years ago
I think this makes sense to me. I can see why it would be better to return a tuple of the intersection point and the object intersected. In an example case I did it was difficult to tell which point in the list corresponded to which object/surface in the scene.
Another option would be to store the intersection object itself. But I can imagine there might be other reasons for not wanting to do this.
@CnlPepper, can you have a think about this and suggest a solution for me to implement?
We should just switch it to store the intersection object itself, it would use a bit more memory (~10x) but would be more flexible.
This has now been fixed in the above commits. You can start using this functionality in the latest development branch or wait till merge with master.
Is there any way how to get object for the hits returned by LoggingRay? If not, it could be a nice enhancement for the LoggingRay to return both the coordinates of the interesction of a ray with an object and the object itself.