Hi Sergey,
But this way I will not recognize if the switch is set to a mask where
my "cloned" lightsource wouldn't be on.
So what I need more than not receiving update visiting is the state
transition.
My idea here would be to add a dummy node to the position where my
lightsource originally was. It would have to publish the "lightsource
on" state every traversal and the cloned lightsource would have to be
switched on/off accordingly ..
cheers
Sebastian
Hi, Sebastian
There are nodevisitor traversal modes, and one of those is
TRAVERSE_ACTIVE_CHILDREN, try to set this on your update visitor, and you'll be
in good shape.
Cheers,
Sergey.
27.08.2012, 22:45, "Sebastian Messerschmidt" <[email protected]>:
Hello,
My current challenge seems to be a hard one ;-)
In my pipeline I effectively removed all lightsources from the original
scenegraph and copied to a separate graph.
Instead of the original lightsources I install an update callback to
transform the lightsources like in the original graph, so I can render
them as light-volumes with the correct pose in another pass.
This is working very well, even with dynamic transforms as childs of the
original light sources. Now the problem with this approach is, that
light sources below a switch or osgSim::Multiswitch node will not work
as expected.
As the update callback is called for every node, regardless of being
active or inactive, the light source will be transformed an active in my
case.
Has anybody an idea how to find out if the current traversal originated
from an inactive parent?
I don't see a simple solution, but maybe the experts here can help me
out. Does the NodeVisitor somehow collect this state, or is there any
way to install a callback on the parental switches to find out when a
subgraph is disabled?
cheers
Sebastian
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org