SoSwitch¶
-
InventorModule¶ genre InventorNodesAutomatic,InventorGroupauthor Silicon Graphics Incpackage MeVisLab/Standarddefinition inventor.def see also SoTogglekeywords choose,select
Purpose¶
The group node SoSwitch typically traverses only one or none of its children. It implements an operation similar to the switch statement in C. This node can be used to toggle the effects of certain properties or to switch between different properties.
The Which Child field specifies the index of the child to traverse, where the first child has an index of 0.
A value of SO_SWITCH_NONE (-1, the default) means no children will be traversed. 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.