Hi Marcus,

Robert Osfield wrote:
> The answer is yes, yes.  To see node and traversal masks in action see
> the osgstereoimage example.
> 
>> just a simple question ( I hope so ;) ) to check if I have understand
>> nodemasks the right way. So I can set nodemasks in order to render a
>> node ( nodemask != 0 ) oder not to render a node ( nodemask = 0 ).
>> Furthermore I can set different nodemasks e.g. node a nodemask = 1, node
>> b nodemask = 2, and then when traversing say just render nodes with
>> nodemask = 1 or nodemask != 2. Is this correct? Perhaps someone has more
>> information about nodemasks oder knows some page where I can find it.

Also keep in mind that these are *bitmasks*. The nodemask and the
traversal mask are logically ANDed and check for a non-zero result.

So if you set masks 1,2,3 on your nodes and then want to draw mask 1 it
will actually draw nodes with masks 1 and 3.

node mask 1 is 001 in binary, node mask 3 is 011 in binary,
traversal mask 1 is 001 in binary, so 1 & 1 = 1 but also 3 & 1 = 1

/Ulrich
_______________________________________________
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

Reply via email to