Hi Robert,

Le 16/01/2012 10:53, Robert Osfield a écrit :
You'd implement a NearestGeometryIntersector that holds a point that
you test your osg::Geometry against, using a osg::TriangleFunctor like
the LineSegmentIntersector would allow you to simply the work down to
just a test of the point against a triangle.  To make things efficient
you'll need to build in testing against the bounding volumes against
the point to decide whether it's contains any points that could be
closer than the current closest distance detected.

Thanks for the idea I'll will start with that.
How could I implement the test against bounding volumes ?
Because it is a visitor, the intersect method will be called on each drawable if I understand it well. Ho can I use the Intersector base to make a previous sort to keep only the nearest geometries or drawable base, before having the triangle functor traversing the datas ?

Thanks.

Regards,
    Vincent.
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to