Hi all,
 
I'm using C# to implement picking in OSG for my project.
 
I created a OsgUtil.PolytopeIntersector object (picker) in my pick method and 
registered it to a OsgUtil.IntersectionVisitor. The picker seems to work when I 
called OsgUtil.PolytopeIntersector.Intersection intersection = 
picker.getFirstIntersection(). But I'm stuck here, because I couldn't see any 
methods that obtain the picked nodes from the intersection object.
 
In C++, it is simple to do so:
osgUtil::LineSegmentIntersector::Intersection intersection = 
picker->getFirstIntersection();
osg::NodePath& nodePath = intersection.nodePath;
osg::Node* node = (nodePath.size()>=1)?nodePath[nodePath.size()-1]:0;
osg::Group* parent = 
(nodePath.size()>=2)?dynamic_cast<osg::Group*>(nodePath[nodePath.size()-2]):0;
 
 
If anyone knows how to obtain picked nodes using C#, please give me some 
advice. Your help is highly appreciated!
 
 
Regards,
 
 
Ke Li
_________________________________________________________________
Make distant family not so distant with Windows Vista® + Windows Live™.
http://www.microsoft.com/windows/digitallife/keepintouch.mspx?ocid=TXT_TAGLM_CPC_VideoChat_distantfamily_012008
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to