Given a pointer-derived picking ray and an arbitrary mesh I can easily find the closest intersection of the ray with the mesh. Is there a built-in (or otherwise straightforward) way of determining not only the closest closest intersection point (call this the entry point) but also the far intersection (exit) point?
I’d hoped that setting
sideOrientation to DOUBLESIDED, along with multipick, might help but apparently not. In my case it’s a sphere and I dare say I could create two partial (PI arc) spheres but there’s an Arcrotate camera involved so I’d have to manually rotate these and I worry about detecting and disambiguating coincident intersections on the edge. I couldn’t see a way to use the triangle predicate other than manual intersection checks.
Given it’s a sphere on the origin I can mirror the closest intersection across the camera’s OXY plane but, you know, Math, (and also, come to think of it, perspective distortions). I’ve got camera basis vectors, know how to find the back frustum ray (and intersect from the other side), and enough quaternion knowledge to do all the rotation calcs but would prefer not to if I don’t need to. TIA!