Hi Peter
Le 08/09/2011 09:40, Peter Hrenka a écrit :
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.
I am trying with an octaedron (8 faces) to avoid having a complex
structure (like a sphere) with too much faces, just to run some tests.
I build the polytope a the point position (radius or the checked
distance) and compute the intersection.
If there is a least one result, I consider the point is near from the
the model.
There is no need to check the euclidian distance to my mind, isn't it ?
Thanks for your help.
Regards,
Vincent
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org