Andrew Cunningham wrote:
Hi,
May I am not seeing something here, but using the NodeMask seems to be not able 
to handle 'multiple' states.

For example, I am using a mask ,0x01 to control the 'visibility' of the nodes. 
This works great.

I have another mask to control 'pickable' state of the node, say 0x02 when used with IntersectionVisitor.
Obviously a node that is not visible is not pickable. That is (pickable && 
!visible) should be culled during a IntersectionVisitor traversal

Therein lies the problem that I see. A simple "bitwise AND" is performed 
between the traversal mask and the node mask and  the result compared to 0.

There is no mask that can be passed to IntersectionVisitor that will cull (pickable 
&& !visible). As long as the pickable bit is on, the node will always be 
traversed.

Maybe I'm stating the obvious but, you appear to be overriding the visible bit to mean both visible and pickable. But you already have a pickable bit. So there's no reason to override the visible bit for pickability. Use the visible bit for visibility, and the pickable bit for pickability, and it should work fine. Or am I missing something?

--
  -Paul Martz      Skew Matrix Software
                   http://www.skew-matrix.com/
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to