Open Inventor Reference
|
Base class for all group nodes. More...
#include <Inventor/nodes/SoGroup.h>
Public Member Functions | |
SoGroup () | |
Creates an empty group node. | |
SoGroup (int nChildren) | |
Constructor that takes approximate number of children. | |
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. | |
virtual void | doAction (SoAction *action) |
Implement actions. | |
virtual void | callback (SoCallbackAction *action) |
virtual void | GLRender (SoGLRenderAction *action) |
These virtual functions implement all of the actions for nodes, Most of the default implementations do nothing. | |
virtual void | getBoundingBox (SoGetBoundingBoxAction *action) |
virtual void | getMatrix (SoGetMatrixAction *action) |
virtual void | handleEvent (SoHandleEventAction *action) |
virtual void | pick (SoPickAction *action) |
virtual void | search (SoSearchAction *action) |
virtual void | write (SoWriteAction *action) |
virtual SoChildList * | getChildren () const |
Returns pointer to children. | |
Static Public Member Functions | |
static void | initClass () |
Initializes base node class. | |
Protected Member Functions | |
virtual SbBool | readInstance (SoInput *in, unsigned short flags) |
Reads stuff into instance of SoGroup. Returns FALSE on error. | |
virtual SbBool | readChildren (SoInput *in) |
Reads just the children into instance of SoGroup. Returns FALSE on error. | |
virtual | ~SoGroup () |
virtual void | copyContents (const SoFieldContainer *fromFC, SbBool copyConnections) |
Copies the contents of the given node into this instance. | |
Protected Attributes | |
SoChildList * | children |
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).
Group { }
SoGroup::SoGroup | ( | ) |
SoGroup::SoGroup | ( | int | nChildren | ) |
Space is allocated for pointers to the children, but the group does not contain any actual child nodes.
virtual SoGroup::~SoGroup | ( | ) | [protected, virtual] |
void SoGroup::addChild | ( | SoNode * | child | ) |
virtual void SoGroup::callback | ( | SoCallbackAction * | action | ) | [virtual] |
Reimplemented from SoNode.
Reimplemented in SoArray, SoLevelOfDetail, SoLOD, SoMultipleCopy, SoSeparator, SoSwitch, and SoTransformSeparator.
virtual void SoGroup::copyContents | ( | const SoFieldContainer * | fromFC, |
SbBool | copyConnections | ||
) | [protected, virtual] |
Reimplemented from SoNode.
Reimplemented in SoUnknownNode.
virtual void SoGroup::doAction | ( | SoAction * | action | ) | [virtual] |
Reimplemented from SoNode.
Reimplemented in SoArray, SoLevelOfDetail, SoLOD, SoMultipleCopy, SoPathSwitch, SoSeparator, SoSwitch, and SoTransformSeparator.
int SoGroup::findChild | ( | const SoNode * | child | ) | const |
virtual void SoGroup::getBoundingBox | ( | SoGetBoundingBoxAction * | action | ) | [virtual] |
Reimplemented from SoNode.
Reimplemented in SoArray, SoBlinker, SoLOD, SoMultipleCopy, SoPathSwitch, SoSeparator, SoSwitch, and SoTransformSeparator.
SoNode* SoGroup::getChild | ( | int | index | ) | const |
virtual SoChildList* SoGroup::getChildren | ( | ) | const [virtual] |
Reimplemented from SoNode.
virtual void SoGroup::getMatrix | ( | SoGetMatrixAction * | action | ) | [virtual] |
Reimplemented from SoNode.
Reimplemented in SoArray, SoMultipleCopy, SoPathSwitch, SoSeparator, SoSwitch, and SoTransformSeparator.
int SoGroup::getNumChildren | ( | ) | const |
virtual void SoGroup::GLRender | ( | SoGLRenderAction * | action | ) | [virtual] |
Reimplemented from SoNode.
Reimplemented in SoArray, SoLevelOfDetail, SoLOD, SoMultipleCopy, SoPathSwitch, SoSeparator, SoSwitch, and SoTransformSeparator.
virtual void SoGroup::handleEvent | ( | SoHandleEventAction * | action | ) | [virtual] |
Reimplemented from SoNode.
Reimplemented in SoArray, SoLocateHighlight, SoMultipleCopy, SoPathSwitch, SoSeparator, SoSwitch, SoWWWAnchor, and SoSelection.
static void SoGroup::initClass | ( | ) | [static] |
Reimplemented from SoNode.
Reimplemented in SoUpgrader, SoV1CustomNode, SoAnnotation, SoArray, SoBlinker, SoLevelOfDetail, SoLocateHighlight, SoLOD, SoMultipleCopy, SoPathSwitch, SoSeparator, SoSwitch, SoTransformSeparator, SoWWWAnchor, SoUnknownNode, and SoSelection.
void SoGroup::insertChild | ( | SoNode * | child, |
int | newChildIndex | ||
) |
virtual void SoGroup::pick | ( | SoPickAction * | action | ) | [virtual] |
Reimplemented from SoNode.
Reimplemented in SoArray, SoMultipleCopy, SoPathSwitch, SoSwitch, and SoTransformSeparator.
Reimplemented from SoFieldContainer.
Reimplemented in SoSeparator, and SoUnknownNode.
void SoGroup::removeAllChildren | ( | ) |
void SoGroup::removeChild | ( | SoNode * | child | ) | [inline] |
void SoGroup::removeChild | ( | int | index | ) |
void SoGroup::replaceChild | ( | int | index, |
SoNode * | newChild | ||
) |
virtual void SoGroup::search | ( | SoSearchAction * | action | ) | [virtual] |
Reimplemented from SoNode.
Reimplemented in SoArray, SoMultipleCopy, SoPathSwitch, SoSeparator, SoSwitch, and SoUnknownNode.
virtual void SoGroup::write | ( | SoWriteAction * | action | ) | [virtual] |
Reimplemented from SoNode.
Reimplemented in SoBlinker, SoSwitch, and SoUnknownNode.
SoChildList* SoGroup::children [protected] |