examples: osgkeyboardmouse: add primitive index to LineSegmentIntersector output
This commit is contained in:
parent
f3c4234f92
commit
69e1df6b65
@ -349,7 +349,9 @@ public:
|
|||||||
if (picker->containsIntersections())
|
if (picker->containsIntersections())
|
||||||
{
|
{
|
||||||
osgUtil::LineSegmentIntersector::Intersection intersection = picker->getFirstIntersection();
|
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;
|
osg::NodePath& nodePath = intersection.nodePath;
|
||||||
node = (nodePath.size()>=1)?nodePath[nodePath.size()-1]:0;
|
node = (nodePath.size()>=1)?nodePath[nodePath.size()-1]:0;
|
||||||
|
Loading…
Reference in New Issue
Block a user