The common solution here is to use node masks. What you do is disable bits on nodes that shouldn't respond to your particular type of intersection, then set the traversal mask on the intersect visitor so it has those bits.
The only problem I've found with this is that it's hard to handle occlusions. In other words, if an uninteresting object is occluding an interesting object, and you use node masks to prevent intersecting against it, then the intersector could pass through the uninteresting object and still report a hit. Sometimes that's what you want though. Chase > -----Original Message----- > From: [EMAIL PROTECTED] [mailto:osg-users- > [EMAIL PROTECTED] On Behalf Of sherman wilcox > Sent: Tuesday, June 19, 2007 12:15 PM > To: osg users > Subject: [osg-users] picking - what did I intersect? > > I have some paged geometry that I'm trying to pick. I followed the > osgpick example. This works just fine presently. However, what happens > when I introduce other models to the scene? How do I distinguish > between what I want to pick from the other geometry? The obvious way > seems to be to name the nodes and cull away nodes that don't have the > correct name. Problem is that my paged data isn't named. I suppose I > could name the top-most node and walk the intersected data's parent > list and see if I stumble across a parent with the correct name, but > this seems like a terrible hack. Is there a more elegant way? > _______________________________________________ > osg-users mailing list > [email protected] > http://openscenegraph.net/mailman/listinfo/osg-users > http://www.openscenegraph.org/ _______________________________________________ osg-users mailing list [email protected] http://openscenegraph.net/mailman/listinfo/osg-users http://www.openscenegraph.org/
