Hi,
I went deeply in debug into my code, and I discovered that the problem
is in OSG v.2.2.
Actually it returns the object with the shortest node path among those
in the intersection vector.
Was it a known bug?

Thanks in advance
Gianluca


-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Robert
Osfield
Sent: Thursday, January 10, 2008 9:05 PM
To: OpenSceneGraph Users
Subject: Re: [osg-users] polytopeIntersector

HI Gianluca,

In the 2.3.x dev release and SVN of the OSG there are improvements to
the PolytopeIntersector that might help you so it'd be worth trying
out over using 2.2

Robert.

On Jan 10, 2008 5:46 PM, Gianluca Natale <[EMAIL PROTECTED]>
wrote:
>
>
>
>
> Hi all!
>
>
>
> I'm trying to use a osgUtil::PolytopeIntersector
>
> to find the closest object in my 3D scene graph (with OSG ver.2.2).
>
> I read on the OSG QSG that it should return the closest object
>
> as the first in the list of intersections.
>
> But it is not like that!
>
> I mean that the array of intersections correctly contains all of
>
> the objects hit by the intersection volume,
>
> but the first of those is not necessary the closest.
>
> BTW, it seems to be the object with the shortest node path. Might it be?
>
>
>
> Any idea of my mistake?
>
>
>
> Thank you in advance.
>
>
>
> Gianluca
>
>
>
> P.S.=attached is the source file (look into the class PickHandler,
>
>     in the method pick; first I tried getting directly the first
> intersection in
>
>         the list, picker->getFirstIntersection(); then I tried to sort
>
>         the intersection on my own. But I pick always the background
> rectangle!)
>
>
> _______________________________________________
> 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


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

Reply via email to