man SoGroup () - base class for all group nodes

NAME

SoGroup - base class for all group nodes

INHERITS FROM

SoBase > SoFieldContainer > SoNode > SoGroup

SYNOPSIS

#include <Inventor/nodes/SoGroup.h> Methods from class SoGroup: c } c } SoGroup()

c } c } SoGroup(int nChildren)

c } c } addChild(SoNode *child)

c } c } insertChild(SoNode *child, int newChildIndex)

c } c } getChild(int index) const

c } c } findChild(const SoNode *child) const

c } c } getNumChildren() const

c } c } removeChild(int index)

c } c } removeChild(SoNode *child)

c } c } removeAllChildren()

c } c } replaceChild(int index, SoNode *newChild)

c } c } replaceChild(SoNode *oldChild, SoNode *newChild)

c } c } getClassTypeId() Methods from class SoNode: c } c } setOverride(SbBool state)

c } c } isOverride() const

c } c } copy(SbBool copyConnections = FALSE) const

c } c } affectsState() const

c } c } getByName(const SbName &name)

c } c } getByName(const SbName &name, SoNodeList &list) Methods from class SoFieldContainer: c } c } setToDefaults()

c } c } hasDefaultValues() const

c } c } fieldsAreEqual(const SoFieldContainer *fc) const

c } c } copyFieldValues(const SoFieldContainer *fc, SbBool copyConnections = FALSE)

c } c } set(const char *fieldDataString)

c } c } get(SbString &fieldDataString)

c } c } getFields(SoFieldList &resultList) const

c } c } getField(const SbName &fieldName) const

c } c } getFieldName(const SoField *field, SbName &fieldName) const

c } c } isNotifyEnabled() const

c } c } enableNotify(SbBool flag) Methods from class SoBase: c } c } ref()

c } c } unref() const

c } c } unrefNoDelete() const

c } c } touch()

c } c } getTypeId() const

c } c } isOfType(SoType type) const

c } c } setName(const SbName &name)

c } c } 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

c } c } SoGroup()

Creates an empty group node. c } c } 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. c } c } addChild(SoNode *child)

Adds a child as last one in group. c } c } insertChild(SoNode *child, int newChildIndex)

Adds a child so that it becomes the one with the given index. c } c } getChild(int index) const

Returns pointer to child node with the given index. c } c } findChild(const SoNode *child) const

Finds index of given child within group. Returns -1 if not found. c } c } getNumChildren() const

Returns number of children. c } c } removeChild(int index)

Removes child with given index from group. c } c } removeChild(SoNode *child)

Removes first instance of given child from group. c } c } removeAllChildren()

Removes all children from group. c } c } replaceChild(int index, SoNode *newChild)

Replaces child with given index with new child. c } c } replaceChild(SoNode *oldChild, SoNode *newChild)

Replaces first instance of given child with new child. c } c } getClassTypeId()

Returns type identifier for this class.

ACTION BEHAVIOR

SoGLRenderAction, SoCallbackAction, SoGetBoundingBoxAction, SoHandleEventAction, SoRayPickAction

Traverses each child in order. SoGetMatrixAction

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. SoSearchAction

If searching for group nodes, compares with this group. Otherwise, continues to search children. SoWriteAction

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

SoArray, SoLevelOfDetail, SoMultipleCopy, SoPathSwitch, SoSeparator, SoSwitch