On Tue, 2007-06-19 at 14:15 -0500, sherman wilcox wrote:
> 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?

There are two ways, I believe, if you're set on using
osgViewer::computeIntersections:

The first is to use a NodeMask (which is what I do). It works great for
my application, which only needs to distinguish between 2D (HUD) and 3D
elements. computeIntersections() always takes a NodeMask, even if you
don't pass it in explicitly.

The second way is to build a NodePath and use an alternate invocation of
computeIntersections. I've never actually done this successfully myself,
so maybe someone else can chime in with a more thorough explanation of
it's usage...

You may know this all already and I could be way off base; if so,
forgive me. :)

> _______________________________________________
> 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/

Reply via email to