This node is another of the six group Nodes. Switch usually traverses only one, none, or all of its children. One use you might make of this node is to switch on and off the effects of some properties or you might use it to switch between different properties.
FILE FORMAT/DEFAULTS Switch { whichChild -1 # SFLong
}
Which child will be traversed is determined by the whichChild field. This field specifies the index of the child to traverse. The first child will have an index of 0.
The default value for the whichChild field is -1. This value means that none of the children will be traversed. The switch will behave just like a regular Group, traversing all children, if the value is set to -3 traverses all children.
Example Use
The following code fragment is from Allnodes.wrl.
Switch {whichChild -1}