Hi Sid,

On Wed, Jun 30, 2010 at 3:21 PM, Sid Vic <[email protected]> wrote:
> Is there any package already included in osg that i can use or do i need to 
> implement this of my own?

I don't know of any tool to do this, it's very application specific
functionality so not the type of thing you'll find in general purpose
libraries.

> Could someone give me a hint whats the best way to solve this?

You'll need to implement a custom osgUtil::Intersector that is able to
efficient pick points.  The osgUtil::LineSegmentIntersector would be a
good place to start when learning how to go about this - it just works
on meshes though.  For point intersection you'll probably be best to
use a cylinder or cone representation for doing the point intersection
testing.  Also have a look at the osgpick example.

Once you have the picked points then it's simple a case of simple
vector maths i.e. (v1-v2).length().

Robert.
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to