I have an OSG tree, where I want some nodes to be visible and some hidden. 
Currently, I set the visibility status with nodemasks; I don't want to use 
switches, because I want to set the visibility of nodes dynamically (thus, 
otherwise, each node would need a switch). 

I have a situation where I want to hide a node X and all its children, with the 
exception of one its children. I made an NodeVisitor which adapts all the 
nodemasks of the node X and all its children. I know that if you want to hide 
the node and its children, basically you only need to change the nodemask of 
node X, because the cull visitor stops at node X. But, this is obviously not 
the behaviour I want. 

How can I change the behaviour of the CullVisitor, so I doesn't stop at nodes 
with the "hidden" nodemask ? I use setInheritanceMask ( with inheritancemask = 
osg::CullSettings::ALL_VARIABLES & ~osg::CullSettings::CULL_MASK) and 
setCullMask, but it seems that does something different. I am a bit confused of 
how inheritance masks work. 

Do I have to set the traversal mask of the cull visitor ? How do I apply then a 
new cull visitor on a camera (or viewer ...) ? 

Thank you!

Benedikt.

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=30522#30522





_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to