Re: [osg-users] Easy way to pick nearest edge?

2008-09-03 Thread Simon Notheis
OK, I will take a look at the implementation to find out why the index/ratioLists are empty. At the moment I use a workaround that interprets the PrimitiveSet and the geometry's Index/VertexArray which seems to work with our scene generation code. Tanks a lot, Simon Robert Osfield

Re: [osg-users] Easy way to pick nearest edge?

2008-09-02 Thread Robert Osfield
Hi Simon, The LineSegmentIntersector records the indices of the vertices of the primitive that has been hit. The LineSegmentIntersector::Intersection::indexList and ratioList provide the indices and barycentric coords. Robert. On Tue, Sep 2, 2008 at 8:54 AM, Simon Notheis [EMAIL PROTECTED]

Re: [osg-users] Easy way to pick nearest edge?

2008-09-02 Thread Simon Notheis
Hi Robert, When i pick e.g. a 3d model of a table my result looks like taht: intersection.ratio 0.298972 intersection.localIntersectionPoint -37.4626 -162.331 25 intersection.localIntersectionNormal -0 0 1 intersection.getWorldIntersectionPoint() 2187.54 -1787.33 750

Re: [osg-users] Easy way to pick nearest edge?

2008-09-02 Thread Robert Osfield
Hi Simon, Go have a dig in the LineSegmentIntersector.cpp implementation, it should be possible to get the index and ratios out. Robert. On Tue, Sep 2, 2008 at 10:17 AM, Simon Notheis [EMAIL PROTECTED] wrote: Hi Robert, When i pick e.g. a 3d model of a table my result looks like taht: