Hi,

Has anyone been able to successfully use
osgViewer::View::computeIntersections() taking a node path argument on a
non-trivial scenegraph?

I currently have a fairly complex scenegraph, but I only want a small
part of it to collide with computeIntersections. When I use
computeIntersections without the nodepath, everything works perfectly.
But as soon as I use the overload with the node path, I get an empty
intersection set. I'm pretty sure the node path I'm giving is correct.

Looking at the implementation of computeIntersections() with the node
path, the only thing that puzzles me is the use of
osg::computeWorldToLocal(nodePath) before computing the matrix inverse,
I'm not sure I fully understand why this is the case. It seems to me the
whole operation should be LocalToWorldMatrix * ViewMatrix *
ProjectionMatrix instead.

In any case, if anyone has a working example (which would show
computeIntersections() with a node path is working correctly, or help
finding the mistake I'm doing), it would be appreciated.


Regards,

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

Reply via email to