[osg-users] IntersectVisitor does not recognize Nodes on different Projection

Thorsten Werner ThorstenWerner at gmx.net
Tue Nov 24 09:29:38 PST 2009


Hi,

I've got a loaded model which is a child of the root.
the second child of the root node is a ortho2d projection, which i use for the GUI. Now i've taken the example osgkeyboardmouse from the osg site and my problem is that it only catches intersections with the loaded model. Not with the Goedes which are at the Ortho2D ProjectionMatrix.

double w(.05), h(.05);
        osgUtil::PolytopeIntersector* picker =
                new osgUtil::PolytopeIntersector(
                osgUtil::Intersector::PROJECTION,
                x-w, y-h, x+w, y+h);
        osgUtil::IntersectionVisitor iv(picker);
        viewer->getCamera()->accept(iv);

this is how i configured the Visitor. I've tried to change the Intersector into a osg::Intersector::WINDOW. ut then absolutely nothing happens anymore. 

Thanks in advance.

Cheers,
Thorsten

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=20283#20283







More information about the osg-users mailing list