<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">Bean, <br>
Sorry, but I'm not a human debugger.<br>
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.<br>
You are not giving enough information here.<br>
<br>
Cheers<br>
Sebastian <br>
<br>
</div>
<blockquote
cite="mid:CALic4kdoJQPUDdhwLWLh4bm_hYVg0Ouv-2ZUET8vRPOzMhJYog@mail.gmail.com"
type="cite">
<div dir="ltr"><span style="font-size:14px">Hi </span><span
style="font-size:14px">Sebastian,</span>
<div style="font-size:14px"> I use the way
about your method, but I get zero point. I may use wrong. Here
is the code:</div>
<div style="font-size:14px">
<div> const float x = v1.x(); </div>
<div><span style="white-space:pre-wrap"> </span>const float y
= v1.y(); </div>
<div><span style="white-space:pre-wrap"> </span>const float
look_offSet = 10.0f; </div>
<div><span style="white-space:pre-wrap"> </span>osg::ref_ptr<osgUtil::PolytopeIntersector>
polyIt = new
osgUtil::PolytopeIntersector(osgUtil::Intersector::PROJECTION,
x - look_offSet , y - look_offSet, x + look_offSet, y +
look_offSet ); </div>
<div><span style="white-space:pre-wrap"> </span>polyIt->setDimensionMask(osgUtil::PolytopeIntersector::DimZero);
// only pick points </div>
<div><br>
</div>
<div><span style="white-space:pre-wrap"> </span>osgUtil::IntersectionVisitor
iv(polyIt ); </div>
<div><br>
</div>
<div><span style="white-space:pre-wrap"> </span>m_OSG->getViewer()->getCamera()->accept(iv);</div>
<div><span style="white-space:pre-wrap"> </span>osg::ref_ptr<osg::Vec3Array>
v = new osg::Vec3Array;</div>
<div><br>
</div>
<div><span style="white-space:pre-wrap"> </span>if
(polyIt->containsIntersections()) //this is <span
style="background-color:rgb(255,0,0)">"false" </span><span
style="background-color:rgb(238,238,238)">Why???</span></div>
<div><span style="white-space:pre-wrap"> </span>{</div>
</div>
<div style="font-size:14px"> .....</div>
<div style="font-size:14px"> }</div>
<div style="font-size:14px">cheers,</div>
<div style="font-size:14px">Bean</div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
osg-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:osg-users@lists.openscenegraph.org">osg-users@lists.openscenegraph.org</a>
<a class="moz-txt-link-freetext" href="http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org">http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org</a>
</pre>
</blockquote>
<br>
</body>
</html>