Re: [osg-users] backface and picking

2010-08-27 Thread Eric Pouliquen
self reply :) I have now good results using world coordinates, doing this : Code: osg::Vec3 n = hitr-getWorldIntersectNormal(); osg::Vec3 eye = window-osgViewer-getCamera()-getInverseViewMatrix().getTrans(); osg::Vec3 inter = hitr-getWorldIntersectPoint(); n.normalize(); osg::Vec3 eyeVec =

Re: [osg-users] backface and picking

2010-08-27 Thread Robert Osfield
Hi Eric, On Fri, Aug 27, 2010 at 1:23 PM, Eric Pouliquen eric.pouliq...@gmail.com wrote: But now, to close this subject, I just would like to understand why I have wrong results using local coordinates as in my previous post... if someone see where is the mistake... If you have any

Re: [osg-users] backface and picking

2010-08-27 Thread Eric Pouliquen
Hi Robert, thanks for your answer. I completely understand what you mean, but I've read in the doc about getEyePoint : Get the eye point in the local coordinate frame a given traversal point. So I don't understand in which coordinate frame these local coords are given in my sample code...

Re: [osg-users] backface and picking

2010-08-27 Thread Jason Daly
Eric Pouliquen wrote: Hi Robert, thanks for your answer. I completely understand what you mean, but I've read in the doc about getEyePoint : Get the eye point in the local coordinate frame a given traversal point. So I don't understand in which coordinate frame these local coords are given

[osg-users] backface and picking

2010-08-26 Thread Eric Pouliquen
Hi all, I'm writing a piece of code to know, when a picking occurred, if the picked face is orientated backward or forward... because if I understand well, there is no simple way to avoid picking results on culled backfaces : Code: osgUtil::LineSegmentIntersector::Intersections