examples: osgkeyboardmouse: add primitive index to LineSegmentIntersector output

This commit is contained in:
blobfish 2017-05-30 18:38:25 -04:00
parent f3c4234f92
commit 69e1df6b65

View File

@ -349,7 +349,9 @@ public:
if (picker->containsIntersections())
{
osgUtil::LineSegmentIntersector::Intersection intersection = picker->getFirstIntersection();
osg::notify(osg::NOTICE)<<"Picked "<<intersection.localIntersectionPoint<<std::endl;
osg::notify(osg::NOTICE)<<"Picked "<<intersection.localIntersectionPoint<<std::endl
<<" primitive index "<<intersection.primitiveIndex
<<std::endl;
osg::NodePath& nodePath = intersection.nodePath;
node = (nodePath.size()>=1)?nodePath[nodePath.size()-1]:0;