Hi,
I have graph with MatrixTransform as ABSOLUTE_RF and I can't pick node with
this type of ref. It si posible pick this node ? or I am doing something wrong
?
bool Picker::handle( const osgGA::GUIEventAdapter& ea, osgGA::GUIActionAdapter&
aa )
{
if (ea.getEventType()==osgGA::GUIEventAdapter::PUSH &&
ea.getButton()==osgGA::GUIEventAdapter::LEFT_MOUSE_BUTTON )
{
osgViewer::View* viewer = dynamic_cast<osgViewer::View*>(&aa);
if ( viewer )
{
osg::ref_ptr<osgUtil::LineSegmentIntersector>
intersector =
new
osgUtil::LineSegmentIntersector(osgUtil::Intersector::WINDOW, ea.getX(),
ea.getY());
osgUtil::IntersectionVisitor iv( intersector.get() );
viewer->getCamera()->accept( iv );
if ( intersector->containsIntersections() )
{
osgUtil::LineSegmentIntersector::Intersection
result = *(intersector->getIntersections().begin());
doUserOperations( result );
}
}
}
return false;
}
Thank you!
Cheers,
Martin
------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=61253#61253
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org