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

Robert Osfield robert.osfield at gmail.com
Fri Nov 13 00:58:07 PST 2009

Hi Lee,

I can't really make sense of your email.  Interseciton testing uses no
information from what is display during rendering - it's totally
independent.   My best guess as to what problem is would be that you
are coming across a problem I've seen with
View::computeIntersection(..) where it computes which camera is active
based on the last mouse event that passed into viewer, if no event has
been passed in yet it can't determine which camera correctly.   Could
it be that this is the issue you are seeing?


On Thu, Nov 12, 2009 at 9:37 PM, Butler, Lee Mr CIV USA USAMC
<lee.butler at us.army.mil> wrote:
> 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?
> _______________________________________________
> osg-users mailing list
> osg-users at lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

More information about the osg-users mailing list