Hi Robert,
let me sum it up shortly then:

I'm trying to do some picking only in a specific subgraph, using the version of 
"computeIntersections" which include a nodepath option.

To test it, I modified the osgpick example (attached) to pick, for instance, 
only the rectangles in the HUD.
What I do is:
- store the root of the HUD in a pHudRootNode
- pick with the funtion:
viewer->computeIntersections(ea.getX(),
                             ea.getY(),
                             pHudRootNode->getParentalNodePaths()[0],
                             intersections)
but I don't get any result.

Gordon kindly replied that maybe the traversal just traverses a node, and not 
the whole path.
Instead, checking the source code, it seems that after using the nodepath to 
unproject the 2D coordinates, the visit is called like this:

...
osgUtil::IntersectionVisitor iv(picker);
nodePath.back()->accept(iv);

so I expected it to start visiting from the last node of the nodepath downwards 
into its subgraph.

Here back to the original question: 
could you please just confirm the this is the way the function is meant to 
work??
If so, any idea on how to have my modified osgpick example to work?

Thanks a lot,
Ricky




-----Original Message-----
From:   [EMAIL PROTECTED] on behalf of Robert Osfield
Sent:   Thu 14/08/2008 18.11
To:     OpenSceneGraph Users
Cc:     
Subject:        Re: [osg-users] pick on specific subgraph / nodepath

On Thu, Aug 14, 2008 at 4:25 PM, Riccardo Corsi <[EMAIL PROTECTED]> wrote:
> Hi Robert,
>
> could you please just confirm the this is the way the function is meant to 
> work??
> If so, any idea on how to have my modified osgpick example to work?

Can't confirm "this" as really don't know what "this" might be
specifically referring to.  I'm rather out of the loop on this thread
having been away so diving in mid flow is not something I'm about to
do.

Robert.
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org




Attachment: osgpick.cpp
Description: Binary data

_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to