Hi Ben,

On Thu, May 22, 2008 at 8:22 AM, Ben Discoe <[EMAIL PROTECTED]> wrote:
> I'm sorry, but a node mask of 0 matches no nodes, and that's definitely not 
> correct; this Visitor is supposed to find nodes which are drawn and cast 
> shadows.  If it finds no nodes, it's not correct.  The question is, how can 
> we fix it?
>

A node mask/traversal mask of 0 absolutely doesn't match any nodes,
that is exactly how things are designed to work.  If you don't want to
cull out whole subgraphs this way then you simple set the node
mask/traversal masks appropriately.

I can't help but feel that you've got the wrong end of the stick w.r.t
traversal masks and node masks.


> Yes, but they are not the same bits.  osgShadow is using bits 0x1 and 0x2.  
> The viewer is using bit 0x4.  It specifically is not using the same bits as 
> osgshadow, to avoid the conflict.

We the viewer shouldn't be setting th 0x1 and 0x2 to 0, it's really
that simple - a 0x4 traversal mask at the viewer level is not at all
appropriate in this instance.

> The question remains, can a NodeVisitor be made to do a logical AND, instead 
> of logical OR?  That's one way to make the code work.  Maybe there is another 
> way to fix it i'm not seeing?

It makes it work in the way you're understanding of node
masks/traversal masks, but not how they are intended to be used,
you're solution would break how they are intended to be used...

If you don't want to switch off the traversal mask complete then you
don't switch the bits off at the viewer level.

Robert.

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

Reply via email to