[osg-users] nodemask and traversals

2007-11-22 Thread Emmanuel Roche
hi again,


Just something about the nodemasks: suppose  i want to stop drawing an
object, all the examples I've seen say claeraly that I have to set
node-setNodeMask(0x0), but suppose now that I really want to change only
one bit in this mask: where should I look for the bit field against which
this mask is checked ? (and the overriding bit field I guess...)

I though only the first bit was checked, but it is not the case, as an
object with the mask 0x0010 is also drawn for instance...

Manu.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] nodemask and traversals

2007-11-22 Thread Robert Osfield
Hi Manu,

You need to match the NodeMask bits to the TraversalMask bits for each
of the NodeVisitors.  The osg::Camera has  setCullMask method that you
can use for the case of the cull traversal.  Note Camera inherits from
osg::CullSettings which is where setCullMask is inherited from.

Robert.

On Nov 22, 2007 11:54 AM, Emmanuel Roche [EMAIL PROTECTED] wrote:
 hi again,


 Just something about the nodemasks: suppose  i want to stop drawing an
 object, all the examples I've seen say claeraly that I have to set
 node-setNodeMask(0x0), but suppose now that I really want to change only
 one bit in this mask: where should I look for the bit field against which
 this mask is checked ? (and the overriding bit field I guess...)

 I though only the first bit was checked, but it is not the case, as an
 object with the mask 0x0010 is also drawn for instance...

 Manu.


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


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


Re: [osg-users] nodemask and traversals

2007-11-22 Thread Ralph Kern
The nodeMask is checked against the cameras cullMask (see
osg::CullSettings::setCullMask()) . Any bit set in both masks will
result in the node been drawn.

Ralph

Emmanuel Roche schrieb:
 hi again,
 
 
 Just something about the nodemasks: suppose  i want to stop drawing an
 object, all the examples I've seen say claeraly that I have to set
 node-setNodeMask(0x0), but suppose now that I really want to change
 only one bit in this mask: where should I look for the bit field against
 which this mask is checked ? (and the overriding bit field I guess...)
 
 I though only the first bit was checked, but it is not the case, as an
 object with the mask 0x0010 is also drawn for instance...
 
 Manu.
 

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