Thank you for the entrypoint, What you mean by rescaling the geomtry directly? Directly modify the vertices and dirty the displaylist, rather than using transformation matrices? I'll try that workaround, it sounds quite coherent for the reason of discrepancy. > I can see that you are using > setIntersectionLimit(osgUtil::Intersector::LIMIT_ONE_PER_DRAWABLE ) > which should be doing what I meant by "only-first-intersection".I personally > not observed any improvement in Polytope behaviour in any of the (NO_LIMIT, > LIMIT_ONE_PER_DRAWABLE, LIMIT_NEAREST etcc.. settings, in any case it > retrieves plenty of objects. Regards, > Date: Wed, 6 Aug 2014 14:16:31 +0200 > From: [email protected] > To: [email protected] > Subject: Re: [osg-users] Erratical behaviour with PolytopeIntersector > > Hello again, > > On 08/06/2014 10:28 AM, Sonya Blade wrote: > > Hi All and Thanks for your feedback, > > > > Please find the reproduced example and obj file at the attachment, it > > doesn't have any visual aids, > > with 1st user click program creates leftbottom of rectangle, second user > > click creates righttop, > > for intersection rectangle and invokes PolytopeIntersector. If I select > > them all I'd expect totally 5 > > objects to be picked, but program produces 420. There is a high chance > > that as Sebastian Messerschmidt > > emphasized, I pick all vertices but can you confirm it ? > > Thanks for your example. > > I can see that you are using > setIntersectionLimit(osgUtil::Intersector::LIMIT_ONE_PER_DRAWABLE ) > which should be doing what I meant by "only-first-intersection". > > Testing your example I do get a lot more intersecions than is to be expected. > Clearly something is wrong there. > > But I think I found the reason for the "erratic" part of your problem: > Currently PolytopeIntersector does not produce correct results in presence > of scaling transformations (which are used in your example). > > As a workaround you could rescale your geometry directly. > > > Cheers, > > Peter > > > _______________________________________________ > 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

