This group node usually traverses only one or none of its children. It implements an operation similar to the
switch statement in C. One can use this node to switch on and off the effects of some properties or
to switch between different properties.
The
whichChild field specifies the index of the child to traverse, where the first child has index 0.
A value of
SO_SWITCH_NONE (-1, the default) means do not traverse any children. A value
of
SO_SWITCH_INHERIT (-2) allows the index to be inherited from a previously-encountered
SoSwitch node or from certain other nodes (such as
SoArray or
SoMultipleCopy) that set the switch value. A value of
SO_SWITCH_ALL (-3) traverses all children, making the switch
behave exactly like a regular
SoGroup.
SoSFInt32 whichChild
Index of the child to traverse, or one of SO_SWITCH_NONE, SO_SWITCH_INHERIT, or SO_SWITCH_ALL.