Hello all,
I am implementing box-selection of objects using
osgUtil::PolytopeIntersector. When I use LineSegmentIntersector, I know
that the first intersection returned is the closest object that was
intersected. In the case of PolytopeIntersector, I need something more.
Basically, I need to know if an object was visible in the polytope or if
it was completely behind some other object. For example, if object A is
in front and object B is completely behind object A (inside the
polytope) then I want to select only object A. But if part of object B
was visible (inside the polytope) then I want to select both.
As I understand it, the intersections returned by the intersector are
ordered by depth but I can't see a way to find out if an intersected
object is visible or not. I want to be able to select multiple objects
but only those that are visible from the camera used to do the intersection.
What I could think is if I had a list of the nodes that were hit for a
given intersection, I could check if the given node was the first to be
hit for some of its intersections. I so, then it was (at least
partially) visible in the polytope, and if not, then some other node was
in front of it and obscured it completely in the polytope. Is that
information available in some way?
Thanks in advance,
J-S
--
______________________________________________________
Jean-Sebastien Guay [EMAIL PROTECTED]
http://www.cm-labs.com/
http://whitestar02.webhop.org/
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org