[osg-users] Problems with osgViewer::View::computeIntersections()

Butler, Lee Mr CIV USA USAMC lee.butler at us.army.mil
Thu Nov 12 13:37:09 PST 2009

I'm having a problem with osgViewer::View::computeIntersections(x, y, i, m).
As I understand it, this takes a view position "x", "y", an intersection list
"i" which will be filled in, and a mask "m" with which traversal is done.

I am running SingleThreaded with a compliation of HEAD, calling 
computeIntersections() with a mask value of ~0.

There are two scenarios:

1) When all items are being displayed just prior to calling computeIntersections()
the result returned is as expected.

2) If not all items are displayed (because some items mask didn't match the last display traversal cull mask) then just prior to calling computeIntersections(), I do some pre-processing to set the node masks on the things I want to intersect.  In the display refresh after the computeIntersections() call, everything is being displayed per the new mask settings.

In this instance, only those items which had been displayed prior to the call to computeIntersections() are found.  It is as if computeIntersections() is not seeing the updated nodeMask values.

I've tried setting the camera mask to ~0 before calling computeIntersections() to no avail.

What am I missing?

More information about the osg-users mailing list