| 1 |
NAME SoGroup "" "" { base class for all group nodes } |
| 2 |
|
| 3 |
INCLUDE nodes/SoGroup.h |
| 4 |
|
| 5 |
DESC { |
| 6 |
This node defines the base class for all group nodes. \cSoGroup\. is a |
| 7 |
node that contains an ordered list of child nodes. The ordering of the |
| 8 |
child nodes represents the traversal order for all operations (for |
| 9 |
example, rendering, picking, and so on). This node is simply a |
| 10 |
container for the child nodes and does not alter the traversal state |
| 11 |
in any way. During traversal, state accumulated for a child is passed |
| 12 |
on to each successive child and then to the parents of the group |
| 13 |
(\cSoGroup\. does not push or pop traversal state as \cSoSeparator\. |
| 14 |
does). |
| 15 |
} |
| 16 |
|
| 17 |
METHOD "" SoGroup() { |
| 18 |
Creates an empty group node. |
| 19 |
} |
| 20 |
|
| 21 |
METHOD CreateN SoGroup(int nChildren) { |
| 22 |
Constructor that takes approximate number of children. Space is |
| 23 |
allocated for pointers to the children, but the group does not contain |
| 24 |
any actual child nodes. |
| 25 |
} |
| 26 |
|
| 27 |
METHOD "" void addChild(SoNode *child) { |
| 28 |
Adds a child as last one in group. |
| 29 |
} |
| 30 |
|
| 31 |
METHOD "" void insertChild(SoNode *child, int newChildIndex) { |
| 32 |
Adds a child so that it becomes the one with the given index. |
| 33 |
} |
| 34 |
|
| 35 |
METHOD "" SoNode * getChild(int index) const { |
| 36 |
Returns pointer to child node with the given index. |
| 37 |
} |
| 38 |
|
| 39 |
METHOD "" int findChild(const SoNode *child) const { |
| 40 |
Finds index of given child within group. Returns -1 if not found. |
| 41 |
} |
| 42 |
|
| 43 |
METHOD "" int getNumChildren() const { |
| 44 |
Returns number of children. |
| 45 |
} |
| 46 |
|
| 47 |
METHOD "" void removeChild(int index) { |
| 48 |
Removes child with given index from group. |
| 49 |
} |
| 50 |
|
| 51 |
METHOD RemoveChildNode void removeChild(SoNode *child) { |
| 52 |
Removes first instance of given child from group. |
| 53 |
} |
| 54 |
|
| 55 |
METHOD "" void removeAllChildren() { |
| 56 |
Removes all children from group. |
| 57 |
} |
| 58 |
|
| 59 |
METHOD "" void replaceChild(int index, SoNode *newChild) { |
| 60 |
Replaces child with given index with new child. |
| 61 |
} |
| 62 |
|
| 63 |
METHOD ReplaceChildNode void replaceChild(SoNode *oldChild, SoNode *newChild) { |
| 64 |
Replaces first instance of given child with new child. |
| 65 |
} |
| 66 |
|
| 67 |
METHOD "" static SoType getClassTypeId() { |
| 68 |
Returns type identifier for this class. |
| 69 |
} |
| 70 |
|
| 71 |
ACTION SoGLRenderAction, SoCallbackAction, SoGetBoundingBoxAction, |
| 72 |
SoHandleEventAction, SoRayPickAction { |
| 73 |
Traverses each child in order. |
| 74 |
} |
| 75 |
|
| 76 |
ACTION SoGetMatrixAction { |
| 77 |
Does nothing unless the group is in the middle of the path chain the |
| 78 |
action is being applied to. If so, the children up to and including |
| 79 |
the next node in the chain are traversed. |
| 80 |
} |
| 81 |
|
| 82 |
ACTION SoSearchAction { |
| 83 |
If searching for group nodes, compares with this group. Otherwise, |
| 84 |
continues to search children. |
| 85 |
} |
| 86 |
|
| 87 |
ACTION SoWriteAction { |
| 88 |
Writes out the group node. This method also deals with any field data |
| 89 |
associated with the group node. As a result, this method is used for |
| 90 |
most subclasses of \cSoGroup\. as well. |
| 91 |
} |
| 92 |
|
| 93 |
ALSO { |
| 94 |
SoArray, |
| 95 |
SoLevelOfDetail, |
| 96 |
SoMultipleCopy, |
| 97 |
SoPathSwitch, |
| 98 |
SoSeparator, |
| 99 |
SoSwitch |
| 100 |
} |