[osg-users] Intersection with 2d plane embedded in 3d
Steve Hardy
osgforum at tevs.eu
Mon May 20 17:18:57 PDT 2019
Hi,
Is there any way to create a "virtual infinite" quad (i.e. plane) that satisfies the intersection test, but without being rendered itself?
Or is there a good way of converting screen coordinates to "local" embedded 2d model coordinates?
Motivation:
My application has line strips and other 'skinny' geometry which are all defined with a zero Z value hence are basically 2d, but are embedded in a 3d model under some DOF transforms. I wish to find the 2d local coordinate corresponding to a mouse click.
I can do this by defining a quad then using a line intersector, but if I hide the quad behind, say, a switch node which is turned off, then the intersection does not work. Maybe that's because I don't know how to restrict computeIntersections() to start at a particular node in the tree. Anyway, a quad needs a particular size, but I really want the plane intersection, not just part of it.
Ultimately, though, I am happy to define a big quad provided I can avoid rendering it.
Thank you!
Cheers,
Steve
------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=76120#76120
More information about the osg-users
mailing list