NAME
SoGroup – base class for all group nodes
INHERITS FROM
SoGroup
SYNOPSIS
#include <Inventor/nodes/SoGroup.h>
Methods from class SoGroup:
void insertChild(SoNode *child, int newChildIndex)
SoNode * getChild(int index) const
int findChild(const SoNode *child) const
int getNumChildren() const
void removeChild(int index)
void removeChild(SoNode *child)
void replaceChild(int index, SoNode *newChild)
static SoType getClassTypeId()
void setOverride(SbBool state)
virtual SbBool affectsState() const
SbBool hasDefaultValues() const
SbBool set(const char *fieldDataString)
SbBool isNotifyEnabled() const
void unrefNoDelete() const
virtual SoType getTypeId() const
virtual void setName(const SbName &name)
virtual SbName getName() const
DESCRIPTION
This node defines the base class for all group nodes.
SoGroup is a node that contains an ordered list of child nodes. The ordering of the child nodes represents the traversal order for all operations (for example,
rendering, picking, and so on). This node is simply a container for the child nodes and does not alter the traversal state in any way. During traversal, state accumulated for a child is passed on to each
successive child and then to the parents of the group (
SoGroup does not push or pop traversal state as
SoSeparator does).
METHODS
SoGroup()
Creates an empty group node.
SoGroup(int nChildren)
Constructor that takes approximate number of children. Space is allocated for pointers to the children, but the group does not contain any actual child nodes.
void addChild(SoNode *child)
Adds a child as last one in group.
void insertChild(SoNode *child, int newChildIndex)
Adds a child so that it becomes the one with the given index.
SoNode * getChild(int index) const
Returns pointer to child node with the given index.
int findChild(const SoNode *child) const
Finds index of given child within group. Returns -1 if not found.
int getNumChildren() const
Returns number of children.
void removeChild(int index)
Removes child with given index from group.
void removeChild(SoNode *child)
Removes first instance of given child from group.
void removeAllChildren()
Removes all children from group.
void replaceChild(int index, SoNode *newChild)
Replaces child with given index with new child.
void replaceChild(SoNode *oldChild, SoNode *newChild)
Replaces first instance of given child with new child.
static SoType getClassTypeId()
Returns type identifier for this class.
ACTION BEHAVIOR
Traverses each child in order.
Does nothing unless the group is in the middle of the path chain the action is being applied to. If so, the children up to and including the next node in the chain are traversed.
If searching for group nodes, compares with this group. Otherwise, continues to search children.
Writes out the group node. This method also deals with any field data associated with the group node. As a result, this method is used for most subclasses of SoGroup as well.
FILE FORMAT/DEFAULTS
Group {
}
SEE ALSO
Typeset by Felix Ritter (MeVis Research GmbH)
Hyperlinks by Wolfram Esser (method park Software AG)