Hi All,
I have a surface where a user can pick points. As suggested I used a Geode with 
Geometry built with osg::PrimitiveSet::POINTS and verteices. Then I used 
PointSprite to show an image on each point (but I think this is not really 
important).

Now I need to drag points with the mouse. First of all I have to handle the 
mouse move event to understand on which point the mouse is over. And now the 
problem. Given the mouse is over one of the previously picked points, how can I 
get which is the exact point of the Geometry from a 
osgUtil::PolytopeIntersector? The Intersection object contains a nodePath that 
at least refers to the Geometry node, not the single vertex/point. So I guess I 
have to loop over the actual picked points coordinates (i.e. 
geometry->getVertexArray()) and calculate the distance from the 
intersection.localIntersectionPoint. Is that right or is there a better way to 
implement it?

Cheers,
Gianni

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=61962#61962





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

Reply via email to