1SoGroup(3IV)() SoGroup(3IV)()
2
3
4
6 SoGroup — base class for all group nodes
7
9 SoBase > SoFieldContainer > SoNode > SoGroup
10
12 #include <Inventor/nodes/SoGroup.h>
13
14 Methods from class SoGroup:
15
16 SoGroup()
17 SoGroup(int nChildren)
18 void addChild(SoNode *child)
19 void insertChild(SoNode *child, int newChildIndex)
20 SoNode * getChild(int index) const
21 int findChild(const SoNode *child) const
22 int getNumChildren() const
23 void removeChild(int index)
24 void removeChild(SoNode *child)
25 void removeAllChildren()
26 void replaceChild(int index, SoNode *newChild)
27 void replaceChild(SoNode *oldChild, SoNode *newChild)
28 static SoType getClassTypeId()
29
30 Methods from class SoNode:
31
32 void setOverride(SbBool state)
33 SbBool isOverride() const
34 SoNode * copy(SbBool copyConnections = FALSE) const
35 virtual SbBool affectsState() const
36 static SoNode * getByName(const SbName &name)
37 static int getByName(const SbName &name, SoNodeList &list)
38
39 Methods from class SoFieldContainer:
40
41 void setToDefaults()
42 SbBool hasDefaultValues() const
43 SbBool fieldsAreEqual(const SoFieldContainer *fc) const
44 void copyFieldValues(const SoFieldContainer *fc, SbBool
45 copyConnections = FALSE)
46 SbBool set(const char *fieldDataString)
47 void get(SbString &fieldDataString)
48 virtual int getFields(SoFieldList &resultList) const
49 virtual SoField * getField(const SbName &fieldName) const
50 SbBool getFieldName(const SoField *field, SbName &fieldName)
51 const
52 SbBool isNotifyEnabled() const
53 SbBool enableNotify(SbBool flag)
54
55 Methods from class SoBase:
56
57 void ref()
58 void unref() const
59 void unrefNoDelete() const
60 void touch()
61 virtual SoType getTypeId() const
62 SbBool isOfType(SoType type) const
63 virtual void setName(const SbName &name)
64 virtual SbName getName() const
65
66
68 This node defines the base class for all group nodes. SoGroup is a node
69 that contains an ordered list of child nodes. The ordering of the child
70 nodes represents the traversal order for all operations (for example,
71 rendering, picking, and so on). This node is simply a container for the
72 child nodes and does not alter the traversal state in any way. During
73 traversal, state accumulated for a child is passed on to each succes‐
74 sive child and then to the parents of the group (SoGroup does not push
75 or pop traversal state as SoSeparator does).
76
78 SoGroup()
79 Creates an empty group node.
80
81 SoGroup(int nChildren)
82 Constructor that takes approximate number of children. Space is
83 allocated for pointers to the children, but the group does not con‐
84 tain any actual child nodes.
85
86 void addChild(SoNode *child)
87 Adds a child as last one in group.
88
89 void insertChild(SoNode *child, int newChildIndex)
90 Adds a child so that it becomes the one with the given index.
91
92 SoNode * getChild(int index) const
93 Returns pointer to child node with the given index.
94
95 int findChild(const SoNode *child) const
96 Finds index of given child within group. Returns -1 if not found.
97
98 int getNumChildren() const
99 Returns number of children.
100
101 void removeChild(int index)
102 Removes child with given index from group.
103
104 void removeChild(SoNode *child)
105 Removes first instance of given child from group.
106
107 void removeAllChildren()
108 Removes all children from group.
109
110 void replaceChild(int index, SoNode *newChild)
111 Replaces child with given index with new child.
112
113 void replaceChild(SoNode *oldChild, SoNode *newChild)
114 Replaces first instance of given child with new child.
115
116 static SoType getClassTypeId()
117 Returns type identifier for this class.
118
119
121 SoGLRenderAction, SoCallbackAction, SoGetBoundingBoxAction, SoHan‐
122 dleEventAction, SoRayPickAction
123 Traverses each child in order.
124
125 SoGetMatrixAction
126 Does nothing unless the group is in the middle of the path chain the
127 action is being applied to. If so, the children up to and including
128 the next node in the chain are traversed.
129
130 SoSearchAction
131 If searching for group nodes, compares with this group. Otherwise,
132 continues to search children.
133
134 SoWriteAction
135 Writes out the group node. This method also deals with any field
136 data associated with the group node. As a result, this method is
137 used for most subclasses of SoGroup as well.
138
139
141 Group {
142 }
143
145 SoArray, SoLevelOfDetail, SoMultipleCopy, SoPathSwitch, SoSeparator,
146 SoSwitch
147
148
149
150
151 SoGroup(3IV)()