Hi Vincent,

Am 08.09.2011 08:51, schrieb Vincent Bourdier:
> Hi all,
> 
> I'm currently trying to compute an intersection between a sphere and a
> node.
> PolytopeIntersector seems to be the best choice according to the
> documentation, but I didn't find any example of implementation.

Have a look at the osgkeyboardmouse example.

> Next, are there some limitations to its usage ? (I saw something about
> convex clipping volumes...)

PolytopeIntersector is mostly useful when used for interactive
picking with small volumes. Its return data structure is too
big for large volumes (containing lots of intersections).

> The goal is to compute if a point is at less than a fixed distance from
> a node, and to my mind the intersection is the best way but maybe there
> is something more adapted ?

I think that should be possible.
I would recommend using a cube which contains
the distance-sphere as the polytope and
check the results from the PolytopeIntersector
for the real (euclidian) distance.

I would advise against trying to
use a "sphere"-polytope since
the intersector must check all
polytope-planes in the innermost loop.

> Thanks for your help.
> 
> Regards,
> Vincent.

Cheers,

Peter
-- 
Vorstand/Board of Management:
Dr. Bernd Finkbeiner, Dr. Roland Niemeier, 
Dr. Arno Steitz, Dr. Ingrid Zech
Vorsitzender des Aufsichtsrats/
Chairman of the Supervisory Board:
Philippe Miltin
Sitz/Registered Office: Tuebingen
Registergericht/Registration Court: Stuttgart
Registernummer/Commercial Register No.: HRB 382196 


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

Reply via email to