Hello Gianni,

One more question. Suppose I have two viewers and I would like to show the axes 
just in one of them. Since the camera with the axes model is in the scene, is 
there any flexible way to enable/disable the axes in one viewer?

You could search the archives for hints of how to display something in only one view. It's been discussed before, and there are a few ways to do it.

I generally do it by adding the appropriate subgraph (object or HUD camera) directly under the master camera of the view in which I want to see it (view->getCamera()) instead of under a scene root which is visible in all views. I find that easy to manage.

Another way is to add a cull callback which will examine the current camera and only traverse the children if it's the right one(s).

Yet another way is with node masks and cull masks in the cullVisitor, but you'll run out of bits in a 32-bit node mask pretty fast, especially if you use node masks for other things too. Node masks have the disadvantage that your whole app needs to know all the node masks in use everywhere or else you'll end up with one bit being used for two things and will have problems. So they're useful for some things but I wouldn't use them for this (personally).

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