[osg-users] PolytopeIntersector returns no hits when zoomed in (3.6.5)

OpenSceneGraph Users osg-users at lists.openscenegraph.org
Fri May 1 13:12:29 PDT 2020

To answer my own question. The approach that worked was to just remove the 
"zNear" plane from the Polytope. It is the last plane.
Seems like an unnecessary hack.

    PolytopeIntersector* picker
      = new PolytopeIntersector ( osgUtil::Intersector::PROJECTION, nx1, 
ny1, nx2, ny2 );
    auto planeList = picker->getPolytope().getPlaneList();
    picker->getPolytope().set ( planeList );

On Friday, May 1, 2020 at 12:06:26 PM UTC-7, AndrewC wrote:
> Hi,
> I am using the PolytopeIntersector to select objects in a "selection box"
> Works as expected in most cases.
> However when I am "zoomed in" (perspective view) fairly tightly ( the eye 
> point is inside the bounding box of the geometry), the PolytopeIntersector 
> returns "no hits" on the geometry.
> I am at my wits end on this one after walking through the OSG code, it 
> seems to be deciding the geometry is not inside the planes of the Polytope.
> Andrew

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/fac96b1d-6d15-436a-9cd7-e9c3472022fb%40googlegroups.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20200501/bb5fad88/attachment.html>

More information about the osg-users mailing list