| 1 |
NAME SoSwitch SoSwitch "" { group node that traverse one chosen child } |
| 2 |
|
| 3 |
INCLUDE nodes/SoSwitch.h |
| 4 |
|
| 5 |
DESC { |
| 6 |
This group node usually traverses only one or none of its children. |
| 7 |
It implements an operation similar to the \kswitch\. statement in C. |
| 8 |
One can use this node to switch on and off the effects of some |
| 9 |
properties or to switch between different properties. |
| 10 |
\p |
| 11 |
The \vwhichChild\. field specifies the index of the child to traverse, |
| 12 |
where the first child has index 0. |
| 13 |
\p |
| 14 |
A value of \kSO_SWITCH_NONE\. (-1, the default) means do not traverse |
| 15 |
any children. A value of \kSO_SWITCH_INHERIT\. (-2) allows the index |
| 16 |
to be inherited from a previously-encountered \cSoSwitch\. node or |
| 17 |
from certain other nodes (such as \cSoArray\. or \cSoMultipleCopy\.) |
| 18 |
that set the switch value. A value of \kSO_SWITCH_ALL\. (-3) traverses |
| 19 |
all children, making the switch behave exactly like a regular |
| 20 |
\cSoGroup\.. |
| 21 |
} |
| 22 |
|
| 23 |
FIELD whichChild { |
| 24 |
Index of the child to traverse, or one of \kSO_SWITCH_NONE\., |
| 25 |
\kSO_SWITCH_INHERIT\., or \kSO_SWITCH_ALL\.. |
| 26 |
} |
| 27 |
|
| 28 |
METHOD "" SoSwitch() { |
| 29 |
Creates a switch node with default settings. |
| 30 |
} |
| 31 |
|
| 32 |
METHOD CreateN SoSwitch(int nChildren) { |
| 33 |
Constructor that takes approximate number of children. |
| 34 |
} |
| 35 |
|
| 36 |
METHOD "" static SoType getClassTypeId() { |
| 37 |
Returns type identifier for this class. |
| 38 |
} |
| 39 |
|
| 40 |
ACTION SoGLRenderAction, SoCallbackAction, SoGetBoundingBoxAction, |
| 41 |
SoGetMatrixAction, SoHandleEventAction, SoRayPickAction { |
| 42 |
Traverses the chosen child or children. |
| 43 |
} |
| 44 |
|
| 45 |
ACTION SoSearchAction { |
| 46 |
If the action's Searching-All flag is set, always traverses all |
| 47 |
children. Otherwise, traverses just the chosen child or children. |
| 48 |
} |
| 49 |
|
| 50 |
ALSO { SoArray, SoLevelOfDetail, SoMultipleCopy, SoPathSwitch } |