Hi Francesco,
Quoting Francesco Argese <[email protected]>:
> Now i like to enable dof management of a switch only when it is
What do you mean by 'dof management'?
> enabled. To do so i need to understand what is the relationship
> between opensceneGraph nodes and SwitchSet index. When i enable switch
> i specify an int representing the SwitchSet in the function void
> setActiveSwitchSet (unsigned int switchSet).
(I assume you're talking about calling 'setActiveSwitchSet' on 'sw01' and that
'sw01' is an osgSim::MultiSwitch.)
'switchSet' determines which children of 'sw01' are considered visible.
'getValueList(switchSet)' gives you a list which children (by index) are
visible is this switch set.
For example switchSet==0 could enable the first child
('First_Switch_Alternative'), switchSet==1 would enable the second child, and
switchSet==2 would activate the first and the second child.
In this case you would have three switchSets [0..2] of which each contains two
values, one for each child.
> Another thing that i have not understood: is if there is a manner to
> enable a switch with the name of the children?
No, not that I'm aware of.
Hope this helps,
Cheers,
/ulrich
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org