[osg-users] How to use the Intersector: : VIEW mode when osgUtil: : PolytopeIntersector and scene node intersection

mirr...@gmail.com mirro187 at gmail.com
Sat Mar 13 03:20:54 PST 2021


win10&osg3..6.4

BoundingBox bb;
bb._min  = osg::vec3d(0,0,0);
bb._max = osg::vec3d(1000,1000,1000);
Polytope poly;
poly.setToBoundingBox(bb);
//
osg::ref_ptr<osgUtil::PolytopeIntersector> picker = new 
osgUtil::PolytopeIntersector(osgUtil::Intersector::VIEW,poly);
picker->setPrecisionHint(osgUtil::Intersector::USE_DOUBLE_CALCULATIONS);
picker->setPrimitiveMask(osgUtil::PolytopeIntersector::POINT_PRIMITIVES);
picker->setIntersectionLimit(osgUtil::Intersector::NO_LIMIT);
//
osgUtil::IntersectionVisitor iv(picker);
_videoFusionNode->accept(iv);//group node of scene 
if (picker->containsIntersections())
{
     //Can't intersection
}

-- 
You received this message because you are subscribed to the Google Groups "OpenSceneGraph Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to osg-users+unsubscribe at googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/osg-users/4938c97f-f77d-4747-8bba-502c8a0ff7c4n%40googlegroups.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20210313/3ce80be6/attachment.html>


More information about the osg-users mailing list