Hi Markus,
Default LinesegmentIntersector is unable to handle intersections with
lines and points. But PolytopeIntersector which will require a
rectangle on screen (or a polytope in space) may do the work for you.
The OpenSceneGraph 3.0 Cookbook (Packt Publishing) introduces how to
use custom intersector to select points in the last chapter.
Unfortunately the whole chapter was removed at last because of page
count limitation. But you can still find the source code from the
Github repo and test it freely:
https://github.com/xarray/osgRecipes/tree/master/cookbook/chapter10/ch10_07
Another way to do point selection effectively is to make use of the
glReadPixels() function with depth component. You can then obtain the
depth value(s) at your mouse point and compute real point coordinate
when it is valid.
Wang Rui
2012/10/1 Markus Ikeda markus.ik...@profactor.at:
Hi,
I'm new to OSG and I tried the osgkeyboardmouse example
root/OpenSceneGraph/trunk/examples/osgkeyboardmouse/osgkeyboardmouse.cpp
but I still couldn't manage to use the polytope intersector to select a
subset of points via mouseclick in a pointcloud.
Did anybody have the same problem and solve it ?
Thank you!
Cheers,
Markus
--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=50360#50360
___
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