Hello,

> I am looking for more elegant way of doing this. My Display HUD is
> directly under the root (just as in the example). Is there a way I can
> turn off its visibility or make it "non-renderable"?

You were asking about node masks and picking a few days ago, right? You 
can use node masks for that too. Set the node mask of your HUD's root 
Group/Transform to 0. This will cause it not to be rendered (and not be 
pickable as well).

In OSG, the rendering is a traversal as well, so it has a traversal mask 
(default 0xFFFFFFFF). It logical-ANDs that to the current node's mask 
(also 0xFFFFFFFF by default) and if the result is nonzero, it goes into 
the subgraph (until it gets to the leaves, which are drawn if the result 
is nonzero). So by setting the mask of a node (or subclass of Node, like 
Group) to 0, you are forcing a result of 0, since (anything) & 0 = 0.

You can get into clever uses of node masks to make something pickable 
but not renderable, or renderable but not pickable, etc. Just remember 
that it isn't an equality test, it's a logical AND, so you have to put 
your binary hat on (assuming you're one of the 0001 out of 0010 who 
understand binary). :-)

Hope this helps,

J-S
-- 
______________________________________________________
Jean-Sebastien Guay    [EMAIL PROTECTED]
                                http://www.cm-labs.com/
                         http://whitestar02.webhop.org/
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to