[osg-users] Different views hide/show different nodes shared scene graph
Catalin Flower
inbox.icf at gmail.com
Thu Apr 18 07:15:33 PDT 2019
Hi Robert,
The object is made up of different sub-types which I can hide/show using the masks. Is works fine with the NodeMask for sub-types and CullMask on the camera.
However I need an extra layer to show/hide the entire object. Remember I have a shared graph with multiple views. I have many objects: Obj1, Obj2, ...
During the rendering I need to show/hide Obj1, Obj2 etc.
This is my problem now and that can be fixed during rendering if I have access to RenderInfo somehow during cull traversal.
I know there is bool osg::Drawable::Cullback::cull (osg::NodeVisitor *nv, osg::Drawable *drawable, osg::RenderInfo *renderInfo) but this is called only for osg::Drawable nodes, I need one to be called for every node in the scene graph.
Also I see there is osg::Node::setCullCallback() by using NodeCallback but it doesn't have access to RenderInfo or Camera and it doesn't return a bool value.
I need a callback with bool as return during cull traversal and to have access to RenderInfo or the camera.
Hope this makes sense to you.
Thank you!
Cheers,
Catalin
------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=75871#75871
More information about the osg-users
mailing list