Hey all,
I'm using osg 2.9.8 and trying to do intersection tests in a thread. The code
is real straightforwards and works well when not threaded:
Code:
osg::ref_ptr<osgUtil::LineSegmentIntersector> intersector = new
osgUtil::LineSegmentIntersector(start, end);
osgUtil::IntersectionVisitor visitor(intersector);
visitor.setLODSelectionMode(osgUtil::IntersectionVisitor::LODSelectionMode::USE_HIGHEST_LEVEL_OF_DETAIL
);
osgEarthNode->accept(visitor);
if(intersector->containsIntersections())
{
osgUtil::LineSegmentIntersector::Intersections::const_iterator firstHit
= intersector->getIntersections().begin();
worldIntersectionPosition = firstHit->getWorldIntersectPoint();
worldIntersectionNormal = firstHit->getWorldIntersectNormal();
return true;
}
Is this a known issue?
-Markus
------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=30183#30183
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org