Hi J-S, The PolytopeIntersector just detects and records objects that intersect with the Polytope, there is no interrelation between the objects, there are all just independent intersections. So for the functionality you are after you'll need to post process the list of intersections.
I'm not 100% clear from your description, but it I do wonder if what your after isn't a bit like what the ConvexPlanerOccluder support does when doing culling against occluders. The support for this you'll find in SceneView.cpp and the ocluder helper classes. Robert. On Wed, Oct 22, 2008 at 2:26 PM, Jean-Sébastien Guay <[EMAIL PROTECTED]> wrote: > 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 > _______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

