Bean,
Sorry, but I'm not a human debugger.
It returns false because you are not hitting anything. It is up to you to analyze the parameters passed to the intersector. Usually one would use window coordinates from a pick event however.
You are not giving enough information here.

Cheers
Sebastian

Hi Sebastian,
I use the way about your method, but I get zero point. I may use wrong. Here is the code:
       const float x = v1.x();
const float y = v1.y();
const float look_offSet = 10.0f;
osg::ref_ptr<osgUtil::PolytopeIntersector> polyIt = new osgUtil::PolytopeIntersector(osgUtil::Intersector::PROJECTION, x - look_offSet , y - look_offSet, x + look_offSet, y + look_offSet ); polyIt->setDimensionMask(osgUtil::PolytopeIntersector::DimZero); // only pick points

osgUtil::IntersectionVisitor iv(polyIt );

m_OSG->getViewer()->getCamera()->accept(iv);
osg::ref_ptr<osg::Vec3Array> v = new osg::Vec3Array;

if (polyIt->containsIntersections())    //this is "false" Why???
{
                           .....
         }
cheers,
Bean


_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to