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 = inter-eye;
eyeVec.normalize();
if (eyeVec*n<0)
{
//here we are in front face case
}
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...
Eric
------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=31099#31099
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org