HI Bruno, For a point cloud you may be best to implement your own osgUtil::Intersector, the design is meant to facilitate this, LineSegmentIntersector and PolytopeIntersector are both examples of subclasses from Intersector so you could use these as inspriation.
Robert On 22 December 2016 at 17:02, Bruno Oliveira <bruno.manata.olive...@gmail.com> wrote: > Hello, > > I have a point cloud and need to get the intersection of my mouse with that > point cloud. For that I use a PolytopeIntersector. I use this intersector > because I found out that a LineSegmentIntersector will not do the trick. > > I set the polytope width and height to 5.0 and therefore I get lots of > intersections, which is not good for me since I need to get the neartest > intersection to my mouse, and if I pick the first intersection of the > polytope I am not guaranteed to have that. A way of doing this would be to > change the polytope size to, for instance, 1.0 or 0.5, but this sometimes > results in no intersections. > > How can I get the cloud point that is neartest to the polytope's center? > > _______________________________________________ > osg-users mailing list > osg-users@lists.openscenegraph.org > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org > _______________________________________________ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org