2009/1/23 Ulrich Hertlein <[email protected]>:
> 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'?

I intend to handle dof considering the relationship with the switch.

>
>> 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.

Ok. I had not understood this relationship beetween children and
SwitchSet: now it is more clear. Now i can try to retrieve the
information i need  linking the index to the children's name of my
switch.

>
> 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,

Thanks, it is very useful.
Francesco Argese
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to