.TH "SoGroup" 3 "Wed May 23 2012" "Version 3.1.3" "Coin" \" -*- nroff -*- .ad l .nh .SH NAME SoGroup \- .PP The \fBSoGroup\fP class is a node which managed other node instances\&. .PP The internal scene data structures in Coin are managed as directed graphs\&. The graphs are built by setting up a hierarchy through the use of group nodes (either of this type, or from subclasses like \fBSoSeparator\fP) which is then traversed when applying actions (like \fBSoGLRenderAction\fP) to it\&. .SH SYNOPSIS .br .PP .PP \fC#include \fP .PP Inherits \fBSoNode\fP\&. .PP Inherited by \fBSoArray\fP, \fBSoLevelOfDetail\fP, \fBSoLOD\fP, \fBSoMultipleCopy\fP, \fBSoPathSwitch\fP, \fBSoSeparator\fP, \fBSoSwitch\fP, \fBSoTransformSeparator\fP, \fBSoVRMLLOD\fP, \fBSoVRMLParent\fP, and \fBSoVRMLSwitch\fP\&. .SS "Public Member Functions" .in +1c .ti -1c .RI "virtual \fBSoType\fP \fBgetTypeId\fP (void) const " .br .ti -1c .RI "\fBSoGroup\fP (void)" .br .ti -1c .RI "\fBSoGroup\fP (int nchildren)" .br .ti -1c .RI "virtual void \fBaddChild\fP (\fBSoNode\fP *node)" .br .ti -1c .RI "virtual void \fBinsertChild\fP (\fBSoNode\fP *child, int newchildindex)" .br .ti -1c .RI "virtual \fBSoNode\fP * \fBgetChild\fP (int index) const " .br .ti -1c .RI "virtual int \fBfindChild\fP (const \fBSoNode\fP *node) const " .br .ti -1c .RI "virtual int \fBgetNumChildren\fP (void) const " .br .ti -1c .RI "virtual void \fBremoveChild\fP (int childindex)" .br .ti -1c .RI "virtual void \fBremoveChild\fP (\fBSoNode\fP *child)" .br .ti -1c .RI "virtual void \fBremoveAllChildren\fP (void)" .br .ti -1c .RI "virtual void \fBreplaceChild\fP (int index, \fBSoNode\fP *newchild)" .br .ti -1c .RI "virtual void \fBreplaceChild\fP (\fBSoNode\fP *oldchild, \fBSoNode\fP *newchild)" .br .ti -1c .RI "virtual void \fBdoAction\fP (\fBSoAction\fP *action)" .br .ti -1c .RI "virtual void \fBGLRender\fP (\fBSoGLRenderAction\fP *action)" .br .ti -1c .RI "virtual void \fBcallback\fP (\fBSoCallbackAction\fP *action)" .br .ti -1c .RI "virtual void \fBgetBoundingBox\fP (\fBSoGetBoundingBoxAction\fP *action)" .br .ti -1c .RI "virtual void \fBgetMatrix\fP (\fBSoGetMatrixAction\fP *action)" .br .ti -1c .RI "virtual void \fBhandleEvent\fP (\fBSoHandleEventAction\fP *action)" .br .ti -1c .RI "virtual void \fBpick\fP (\fBSoPickAction\fP *action)" .br .ti -1c .RI "virtual void \fBsearch\fP (\fBSoSearchAction\fP *action)" .br .ti -1c .RI "virtual void \fBwrite\fP (\fBSoWriteAction\fP *action)" .br .ti -1c .RI "virtual void \fBgetPrimitiveCount\fP (\fBSoGetPrimitiveCountAction\fP *action)" .br .ti -1c .RI "virtual void \fBaudioRender\fP (\fBSoAudioRenderAction\fP *action)" .br .ti -1c .RI "virtual \fBSoChildList\fP * \fBgetChildren\fP (void) const " .br .in -1c .SS "Static Public Member Functions" .in +1c .ti -1c .RI "static \fBSoType\fP \fBgetClassTypeId\fP (void)" .br .ti -1c .RI "static void \fBinitClass\fP (void)" .br .in -1c .SS "Protected Member Functions" .in +1c .ti -1c .RI "virtual const \fBSoFieldData\fP * \fBgetFieldData\fP (void) const " .br .ti -1c .RI "virtual \fB~SoGroup\fP ()" .br .ti -1c .RI "virtual SbBool \fBreadInstance\fP (\fBSoInput\fP *in, unsigned short flags)" .br .ti -1c .RI "virtual SbBool \fBreadChildren\fP (\fBSoInput\fP *in)" .br .ti -1c .RI "virtual void \fBcopyContents\fP (const \fBSoFieldContainer\fP *from, SbBool copyconnections)" .br .in -1c .SS "Static Protected Member Functions" .in +1c .ti -1c .RI "static const \fBSoFieldData\fP ** \fBgetFieldDataPtr\fP (void)" .br .in -1c .SS "Protected Attributes" .in +1c .ti -1c .RI "\fBSoChildList\fP * \fBchildren\fP" .br .in -1c .SS "Additional Inherited Members" .SH "Detailed Description" .PP The \fBSoGroup\fP class is a node which managed other node instances\&. .PP The internal scene data structures in Coin are managed as directed graphs\&. The graphs are built by setting up a hierarchy through the use of group nodes (either of this type, or from subclasses like \fBSoSeparator\fP) which is then traversed when applying actions (like \fBSoGLRenderAction\fP) to it\&. \fBSoGroup\fP, \fBSoSeparator\fP, and other classes derived from \fBSoGroup\fP, are the 'tools' the application programmer uses when making the layout of the scene graph\&. .PP An often asked question about \fBSoGroup\fP nodes is: 'Why is there no SoGroup::getParent() method?' The answer to this is that nodes in the scene graph can have multiple parents, so a simple getParent() method wouldn't work\&. If you have a node pointer (or other node identification) of a node that you want to remove from the scene graph, what you need to do is to use an \fBSoSearchAction\fP to find all paths down to the node, and then invoke \fBSoGroup::removeChild()\fP from all found parents of the node\&. .PP The function would look something like this: .PP .PP .nf void getParents(SoNode * node, SoNode * root, SoPathList & parents) { SoSearchAction sa; sa\&.setNode(node); sa\&.setInterest(SoSearchAction::ALL); sa\&.apply(root); parents = sa\&.getPaths(); } .fi .PP .PP Or if you \fIknow\fP that your node of interest has only a single parent: .PP .PP .nf SoGroup * getParent(SoNode * node, SoNode * root) { SoSearchAction sa; sa\&.setNode(node); sa\&.setInterest(SoSearchAction::FIRST); sa\&.apply(root); SoPath * p = sa\&.getPath(); assert(p && 'not found'); if (p->getLength() < 2) { return NULL; } // no parent return (SoGroup *)p->getNodeFromTail(1); } .fi .PP .PP An important note about a potential problem using \fBSoGroup\fP nodes which it is not common to stumble on, but which makes hard to find bugs when one does: you should not change the scene graph layout during any action traversal, as that is not allowed by the internal Coin code\&. I\&.e\&. do not use \fBaddChild()\fP, \fBremoveChild()\fP, \fBinsertChild()\fP or \fBreplaceChild()\fP from any callback that is triggered directly or indirectly from an action traversal\&. The most common way of getting hit by this error, would be something like the following (simplified) example: .PP .PP .nf #include #include #include #include #include #include #include SoPointLightManip * global_pointlightmanip; SoSeparator * global_root; // Remove pointlight when clicking right mouse button\&. static void mySelectionC(void * ud, SoEventCallback * n) { const SoMouseButtonEvent * mbe = (SoMouseButtonEvent*) n->getEvent(); if ((mbe->getButton() == SoMouseButtonEvent::BUTTON2) && (mbe->getState() == SoButtonEvent::DOWN)) { if (global_pointlightmanip) { global_root->removeChild(global_pointlightmanip); global_pointlightmanip = NULL; } } } int main(int argc, char ** argv) { QWidget * window = SoQt::init(argv[0]); global_root = new SoSeparator; global_root->ref(); SoEventCallback * ecb = new SoEventCallback; ecb->addEventCallback(SoMouseButtonEvent::getClassTypeId(), mySelectionC, 0); global_root->addChild(ecb); global_root->addChild(new SoCone); global_pointlightmanip = new SoPointLightManip; global_root->addChild(global_pointlightmanip); SoQtExaminerViewer * viewer = new SoQtExaminerViewer(window); viewer->setSceneGraph(global_root); viewer->show(); SoQt::show(window); SoQt::mainLoop(); global_root->unref(); delete viewer; return 0; } .fi .PP .PP What happens in the above case is this: when clicking with the right mouse button, the SoQtExaminerViewer converts the Qt event to a Coin event, which is sent down the scene graph with an \fBSoHandleEventAction\fP\&. The action traversal reaches the 'global_root' \fBSoSeparator\fP node, where it sees that it should further traverse 3 child nodes (first the \fBSoEventCallback\fP, then the \fBSoCone\fP, then the \fBSoPointLightManip\fP)\&. When it then traverses the \fBSoEventCallback\fP, the mySelectionC() callback will be invoked, which removes the last child\&. But the \fBSoHandleEventAction\fP will still continue it's traversal as if the global_root node has 3 children -- and the code will crash\&. .PP (This exact example would perhaps be straight-forward to handle internally in Coin, but there are other ways to change the scene graph layout that are very difficult to handle properly\&. So in general, changing layout during action traversal is not allowed\&.) .PP What to do in these cases is to change the code inside the callback to not do any operations that immediately changes the layout of the scene graph, but to delay it for after the traversal is done\&. This can e\&.g\&. be done by using a Coin sensor\&. .PP \fBFILE FORMAT/DEFAULTS:\fP .PP .nf Group { } .fi .PP .SH "Constructor & Destructor Documentation" .PP .SS "SoGroup::SoGroup (void)" Default constructor\&. .SS "SoGroup::SoGroup (intnchildren)" Constructor\&. .PP The argument should be the approximate number of children which is expected to be inserted below this node\&. The number need not be exact, as it is only used as a hint for better memory resource allocation\&. .SS "SoGroup::~SoGroup ()\fC [protected]\fP, \fC [virtual]\fP" Destructor\&. .SH "Member Function Documentation" .PP .SS "\fBSoType\fP SoGroup::getClassTypeId (void)\fC [static]\fP" This static method returns the \fBSoType\fP object associated with objects of this class\&. .PP Reimplemented from \fBSoNode\fP\&. .PP Reimplemented in \fBSoExtSelection\fP, \fBSoVRMLSwitch\fP, \fBSoSelection\fP, \fBSoWWWAnchor\fP, \fBSoVRMLAnchor\fP, \fBSoGeoSeparator\fP, \fBSoSwitch\fP, \fBSoShadowGroup\fP, \fBSoVRMLCollision\fP, \fBSoVRMLGroup\fP, \fBSoVRMLLOD\fP, \fBSoLocateHighlight\fP, \fBSoSeparator\fP, \fBSoVRMLBillboard\fP, \fBSoVRMLParent\fP, \fBSoBlinker\fP, \fBSoLOD\fP, \fBSoArray\fP, \fBSoLevelOfDetail\fP, \fBSoVRMLTransform\fP, \fBSoMultipleCopy\fP, \fBSoPathSwitch\fP, \fBSoAnnotation\fP, and \fBSoTransformSeparator\fP\&. .SS "\fBSoType\fP SoGroup::getTypeId (void) const\fC [virtual]\fP" Returns the type identification of an object derived from a class inheriting \fBSoBase\fP\&. This is used for run-time type checking and 'downward' casting\&. .PP Usage example: .PP .PP .nf void foo(SoNode * node) { if (node->getTypeId() == SoFile::getClassTypeId()) { SoFile * filenode = (SoFile *)node; // safe downward cast, knows the type } } .fi .PP .PP For application programmers wanting to extend the library with new nodes, engines, nodekits, draggers or others: this method needs to be overridden in \fIall\fP subclasses\&. This is typically done as part of setting up the full type system for extension classes, which is usually accomplished by using the pre-defined macros available through for instance Inventor/nodes/SoSubNode\&.h (SO_NODE_INIT_CLASS and SO_NODE_CONSTRUCTOR for node classes), \fBInventor/engines/SoSubEngine\&.h\fP (for engine classes) and so on\&. .PP For more information on writing Coin extensions, see the class documentation of the toplevel superclasses for the various class groups\&. .PP Implements \fBSoBase\fP\&. .PP Reimplemented in \fBSoExtSelection\fP, \fBSoVRMLSwitch\fP, \fBSoSelection\fP, \fBSoWWWAnchor\fP, \fBSoVRMLAnchor\fP, \fBSoGeoSeparator\fP, \fBSoSwitch\fP, \fBSoShadowGroup\fP, \fBSoVRMLCollision\fP, \fBSoVRMLGroup\fP, \fBSoVRMLLOD\fP, \fBSoLocateHighlight\fP, \fBSoSeparator\fP, \fBSoVRMLBillboard\fP, \fBSoVRMLParent\fP, \fBSoBlinker\fP, \fBSoLOD\fP, \fBSoArray\fP, \fBSoLevelOfDetail\fP, \fBSoVRMLTransform\fP, \fBSoMultipleCopy\fP, \fBSoPathSwitch\fP, \fBSoAnnotation\fP, and \fBSoTransformSeparator\fP\&. .SS "const \fBSoFieldData\fP ** SoGroup::getFieldDataPtr (void)\fC [static]\fP, \fC [protected]\fP" \fIThis API member is considered internal to the library, as it is not likely to be of interest to the application programmer\&.\fP .PP Reimplemented from \fBSoNode\fP\&. .PP Reimplemented in \fBSoExtSelection\fP, \fBSoVRMLSwitch\fP, \fBSoSelection\fP, \fBSoWWWAnchor\fP, \fBSoVRMLAnchor\fP, \fBSoGeoSeparator\fP, \fBSoSwitch\fP, \fBSoShadowGroup\fP, \fBSoVRMLCollision\fP, \fBSoVRMLGroup\fP, \fBSoVRMLLOD\fP, \fBSoLocateHighlight\fP, \fBSoSeparator\fP, \fBSoVRMLBillboard\fP, \fBSoVRMLParent\fP, \fBSoBlinker\fP, \fBSoLOD\fP, \fBSoArray\fP, \fBSoLevelOfDetail\fP, \fBSoVRMLTransform\fP, \fBSoMultipleCopy\fP, \fBSoPathSwitch\fP, \fBSoAnnotation\fP, and \fBSoTransformSeparator\fP\&. .SS "const \fBSoFieldData\fP * SoGroup::getFieldData (void) const\fC [protected]\fP, \fC [virtual]\fP" Returns a pointer to the class-wide field data storage object for this instance\&. If no fields are present, returns \fCNULL\fP\&. .PP Reimplemented from \fBSoFieldContainer\fP\&. .PP Reimplemented in \fBSoExtSelection\fP, \fBSoVRMLSwitch\fP, \fBSoSelection\fP, \fBSoWWWAnchor\fP, \fBSoVRMLAnchor\fP, \fBSoGeoSeparator\fP, \fBSoSwitch\fP, \fBSoShadowGroup\fP, \fBSoVRMLCollision\fP, \fBSoVRMLGroup\fP, \fBSoVRMLLOD\fP, \fBSoLocateHighlight\fP, \fBSoSeparator\fP, \fBSoVRMLBillboard\fP, \fBSoVRMLParent\fP, \fBSoBlinker\fP, \fBSoLOD\fP, \fBSoArray\fP, \fBSoLevelOfDetail\fP, \fBSoVRMLTransform\fP, \fBSoMultipleCopy\fP, \fBSoPathSwitch\fP, \fBSoAnnotation\fP, and \fBSoTransformSeparator\fP\&. .SS "void SoGroup::initClass (void)\fC [static]\fP" Sets up initialization for data common to all instances of this class, like submitting necessary information to the Coin type system\&. .PP Reimplemented from \fBSoNode\fP\&. .PP Reimplemented in \fBSoExtSelection\fP, \fBSoVRMLSwitch\fP, \fBSoSelection\fP, \fBSoWWWAnchor\fP, \fBSoVRMLAnchor\fP, \fBSoGeoSeparator\fP, \fBSoLOD\fP, \fBSoSwitch\fP, \fBSoShadowGroup\fP, \fBSoVRMLCollision\fP, \fBSoVRMLGroup\fP, \fBSoVRMLLOD\fP, \fBSoLocateHighlight\fP, \fBSoSeparator\fP, \fBSoVRMLBillboard\fP, \fBSoVRMLParent\fP, \fBSoBlinker\fP, \fBSoArray\fP, \fBSoLevelOfDetail\fP, \fBSoVRMLTransform\fP, \fBSoMultipleCopy\fP, \fBSoPathSwitch\fP, \fBSoAnnotation\fP, and \fBSoTransformSeparator\fP\&. .SS "void SoGroup::addChild (\fBSoNode\fP *node)\fC [virtual]\fP" Append a child \fInode\fP to the list of children nodes this group node is managing\&. .PP Please note that this method is not virtual in the original SGI Inventor API\&. .PP Reimplemented in \fBSoVRMLSwitch\fP, \fBSoVRMLLOD\fP, and \fBSoVRMLParent\fP\&. .SS "void SoGroup::insertChild (\fBSoNode\fP *child, intnewchildindex)\fC [virtual]\fP" Insert a \fIchild\fP node at position \fInewchildindex\fP\&. .PP \fInewchildindex\fP must be <= this->\fBgetNumChildren()\fP .PP Please note that this method is not virtual in the original SGI Inventor API\&. .PP Reimplemented in \fBSoVRMLSwitch\fP, \fBSoVRMLLOD\fP, and \fBSoVRMLParent\fP\&. .SS "\fBSoNode\fP * SoGroup::getChild (intindex) const\fC [virtual]\fP" Returns pointer to child node at \fIindex\fP\&. .PP Please note that this method is not virtual in the original SGI Inventor API\&. .PP Reimplemented in \fBSoVRMLSwitch\fP, \fBSoVRMLLOD\fP, and \fBSoVRMLParent\fP\&. .SS "int SoGroup::findChild (const \fBSoNode\fP *node) const\fC [virtual]\fP" Returns index in our list of children for child \fInode\fP, or -1 if \fInode\fP is not a child of this group node\&. .PP Please note that this method is not virtual in the original SGI Inventor API\&. .PP Reimplemented in \fBSoVRMLSwitch\fP, \fBSoVRMLLOD\fP, and \fBSoVRMLParent\fP\&. .SS "int SoGroup::getNumChildren (void) const\fC [virtual]\fP" Returns number of child nodes managed by this group\&. .PP Please note that this method is not virtual in the original SGI Inventor API\&. .PP Reimplemented in \fBSoVRMLSwitch\fP, \fBSoVRMLLOD\fP, and \fBSoVRMLParent\fP\&. .SS "void SoGroup::removeChild (intchildindex)\fC [virtual]\fP" Remove node at \fIchildindex\fP in our list of children\&. .PP Please note that this method is not virtual in the original SGI Inventor API\&. .PP Reimplemented in \fBSoVRMLSwitch\fP, \fBSoVRMLLOD\fP, and \fBSoVRMLParent\fP\&. .SS "void SoGroup::removeChild (\fBSoNode\fP *child)\fC [virtual]\fP" Remove \fIchild\fP from the set of children managed by this group node\&. Will decrease the reference count of \fIchild\fP by 1\&. .PP This is a convenience method\&. It will simply call \fBfindChild()\fP with \fIchild\fP as argument, and then call \fBremoveChild(int)\fP if the child is found\&. .PP Please note that this method is not virtual in the original SGI Inventor API\&. .PP Reimplemented in \fBSoVRMLSwitch\fP, \fBSoVRMLLOD\fP, and \fBSoVRMLParent\fP\&. .SS "void SoGroup::removeAllChildren (void)\fC [virtual]\fP" Do not manage the children anymore\&. Will dereference all children by 1 as they are removed\&. .PP Please note that this method is not virtual in the original SGI Inventor API\&. .PP Reimplemented in \fBSoVRMLSwitch\fP, \fBSoVRMLLOD\fP, and \fBSoVRMLParent\fP\&. .SS "void SoGroup::replaceChild (intindex, \fBSoNode\fP *newchild)\fC [virtual]\fP" Replace child at \fIindex\fP with \fInewChild\fP\&. .PP Dereferences the child previously at \fIindex\fP, and increases the reference count of \fInewChild\fP by 1\&. .PP \fIindex\fP must be < this->\fBgetNumChildren()\fP .PP Please note that this method is not virtual in the original SGI Inventor API\&. .PP Reimplemented in \fBSoVRMLSwitch\fP, \fBSoVRMLLOD\fP, and \fBSoVRMLParent\fP\&. .SS "void SoGroup::replaceChild (\fBSoNode\fP *oldchild, \fBSoNode\fP *newchild)\fC [virtual]\fP" Replace \fIoldchild\fP with \fInewchild\fP\&. .PP Dereferences \fIoldchild\fP by 1, and increases the reference count of \fInewchild\fP by 1\&. .PP This is a convenience method\&. It will simply call \fBfindChild()\fP with \fIoldchild\fP as argument, and call \fBreplaceChild(int, SoNode*)\fP if the child is found\&. .PP Please note that this method is not virtual in the original SGI Inventor API\&. .PP Reimplemented in \fBSoVRMLSwitch\fP, \fBSoVRMLLOD\fP, and \fBSoVRMLParent\fP\&. .SS "void SoGroup::doAction (\fBSoAction\fP *action)\fC [virtual]\fP" This function performs the typical operation of a node for any action\&. .PP Reimplemented from \fBSoNode\fP\&. .PP Reimplemented in \fBSoVRMLSwitch\fP, \fBSoVRMLTransform\fP, \fBSoVRMLLOD\fP, \fBSoVRMLGroup\fP, \fBSoVRMLParent\fP, \fBSoArray\fP, \fBSoSeparator\fP, \fBSoSwitch\fP, \fBSoVRMLBillboard\fP, \fBSoLOD\fP, \fBSoLevelOfDetail\fP, \fBSoMultipleCopy\fP, \fBSoPathSwitch\fP, and \fBSoTransformSeparator\fP\&. .SS "void SoGroup::GLRender (\fBSoGLRenderAction\fP *action)\fC [virtual]\fP" Action method for the \fBSoGLRenderAction\fP\&. .PP This is called during rendering traversals\&. Nodes influencing the rendering state in any way or who wants to throw geometry primitives at OpenGL overrides this method\&. .PP Reimplemented from \fBSoNode\fP\&. .PP Reimplemented in \fBSoVRMLSwitch\fP, \fBSoVRMLLOD\fP, \fBSoVRMLGroup\fP, \fBSoArray\fP, \fBSoSeparator\fP, \fBSoSwitch\fP, \fBSoVRMLBillboard\fP, \fBSoLOD\fP, \fBSoVRMLCollision\fP, \fBSoLevelOfDetail\fP, \fBSoMultipleCopy\fP, \fBSoPathSwitch\fP, \fBSoTransformSeparator\fP, and \fBSoAnnotation\fP\&. .SS "void SoGroup::callback (\fBSoCallbackAction\fP *action)\fC [virtual]\fP" Action method for \fBSoCallbackAction\fP\&. .PP Simply updates the state according to how the node behaves for the render action, so the application programmer can use the \fBSoCallbackAction\fP for extracting information about the scene graph\&. .PP Reimplemented from \fBSoNode\fP\&. .PP Reimplemented in \fBSoVRMLSwitch\fP, \fBSoVRMLTransform\fP, \fBSoVRMLLOD\fP, \fBSoVRMLGroup\fP, \fBSoSeparator\fP, \fBSoArray\fP, \fBSoSwitch\fP, \fBSoPathSwitch\fP, \fBSoVRMLBillboard\fP, \fBSoGeoSeparator\fP, \fBSoLOD\fP, \fBSoLevelOfDetail\fP, \fBSoMultipleCopy\fP, and \fBSoTransformSeparator\fP\&. .SS "void SoGroup::getBoundingBox (\fBSoGetBoundingBoxAction\fP *action)\fC [virtual]\fP" Action method for the \fBSoGetBoundingBoxAction\fP\&. .PP Calculates bounding box and center coordinates for node and modifies the values of the \fIaction\fP to encompass the bounding box for this node and to shift the center point for the scene more towards the one for this node\&. .PP Nodes influencing how geometry nodes calculates their bounding box also overrides this method to change the relevant state variables\&. .PP Reimplemented from \fBSoNode\fP\&. .PP Reimplemented in \fBSoVRMLSwitch\fP, \fBSoVRMLLOD\fP, \fBSoVRMLTransform\fP, \fBSoVRMLGroup\fP, \fBSoArray\fP, \fBSoSeparator\fP, \fBSoLOD\fP, \fBSoSwitch\fP, \fBSoGeoSeparator\fP, \fBSoVRMLBillboard\fP, \fBSoLevelOfDetail\fP, \fBSoMultipleCopy\fP, \fBSoPathSwitch\fP, \fBSoBlinker\fP, and \fBSoTransformSeparator\fP\&. .SS "void SoGroup::getMatrix (\fBSoGetMatrixAction\fP *action)\fC [virtual]\fP" Action method for \fBSoGetMatrixAction\fP\&. .PP Updates \fIaction\fP by accumulating with the transformation matrix of this node (if any)\&. .PP Reimplemented from \fBSoNode\fP\&. .PP Reimplemented in \fBSoVRMLSwitch\fP, \fBSoVRMLTransform\fP, \fBSoVRMLGroup\fP, \fBSoArray\fP, \fBSoSeparator\fP, \fBSoSwitch\fP, \fBSoGeoSeparator\fP, \fBSoVRMLBillboard\fP, \fBSoMultipleCopy\fP, \fBSoPathSwitch\fP, and \fBSoTransformSeparator\fP\&. .SS "void SoGroup::handleEvent (\fBSoHandleEventAction\fP *action)\fC [virtual]\fP" Action method for \fBSoHandleEventAction\fP\&. .PP Inspects the event data from \fIaction\fP, and processes it if it is something which this node should react to\&. .PP Nodes influencing relevant state variables for how event handling is done also overrides this method\&. .PP Reimplemented from \fBSoNode\fP\&. .PP Reimplemented in \fBSoExtSelection\fP, \fBSoSelection\fP, \fBSoVRMLSwitch\fP, \fBSoSeparator\fP, \fBSoArray\fP, \fBSoWWWAnchor\fP, \fBSoVRMLAnchor\fP, \fBSoLocateHighlight\fP, \fBSoSwitch\fP, \fBSoMultipleCopy\fP, and \fBSoPathSwitch\fP\&. .SS "void SoGroup::pick (\fBSoPickAction\fP *action)\fC [virtual]\fP" Action method for \fBSoPickAction\fP\&. .PP Does common processing for \fBSoPickAction\fP \fIaction\fP instances\&. .PP Reimplemented from \fBSoNode\fP\&. .PP Reimplemented in \fBSoVRMLSwitch\fP, \fBSoArray\fP, \fBSoSwitch\fP, \fBSoVRMLBillboard\fP, \fBSoMultipleCopy\fP, \fBSoPathSwitch\fP, and \fBSoTransformSeparator\fP\&. .SS "void SoGroup::search (\fBSoSearchAction\fP *action)\fC [virtual]\fP" Action method for \fBSoSearchAction\fP\&. .PP Compares the search criteria from the \fIaction\fP to see if this node is a match\&. Searching is done by matching up \fIall\fP criteria set up in the \fBSoSearchAction\fP -- if \fIany\fP of the requested criteria is a miss, the search is not deemed successful for the node\&. .PP \fBSee also:\fP .RS 4 \fBSoSearchAction\fP .RE .PP .PP Reimplemented from \fBSoNode\fP\&. .PP Reimplemented in \fBSoVRMLSwitch\fP, \fBSoVRMLGroup\fP, \fBSoVRMLLOD\fP, \fBSoSeparator\fP, \fBSoArray\fP, \fBSoVRMLParent\fP, \fBSoSwitch\fP, \fBSoVRMLBillboard\fP, \fBSoMultipleCopy\fP, and \fBSoPathSwitch\fP\&. .SS "void SoGroup::write (\fBSoWriteAction\fP *action)\fC [virtual]\fP" Action method for \fBSoWriteAction\fP\&. .PP Writes out a node object, and any connected nodes, engines etc, if necessary\&. .PP Reimplemented from \fBSoNode\fP\&. .PP Reimplemented in \fBSoVRMLSwitch\fP, \fBSoVRMLGroup\fP, \fBSoVRMLLOD\fP, \fBSoVRMLParent\fP, \fBSoSwitch\fP, and \fBSoBlinker\fP\&. .SS "void SoGroup::getPrimitiveCount (\fBSoGetPrimitiveCountAction\fP *action)\fC [virtual]\fP" Action method for the \fBSoGetPrimitiveCountAction\fP\&. .PP Calculates the number of triangle, line segment and point primitives for the node and adds these to the counters of the \fIaction\fP\&. .PP Nodes influencing how geometry nodes calculates their primitive count also overrides this method to change the relevant state variables\&. .PP Reimplemented from \fBSoNode\fP\&. .PP Reimplemented in \fBSoVRMLGroup\fP, \fBSoVRMLLOD\fP, \fBSoVRMLTransform\fP, \fBSoSeparator\fP, \fBSoArray\fP, \fBSoVRMLParent\fP, \fBSoSwitch\fP, \fBSoLOD\fP, \fBSoGeoSeparator\fP, \fBSoMultipleCopy\fP, \fBSoPathSwitch\fP, and \fBSoTransformSeparator\fP\&. .SS "void SoGroup::audioRender (\fBSoAudioRenderAction\fP *action)\fC [virtual]\fP" Action method for \fBSoAudioRenderAction\fP\&. .PP Does common processing for \fBSoAudioRenderAction\fP \fIaction\fP instances\&. .PP Reimplemented from \fBSoNode\fP\&. .PP Reimplemented in \fBSoVRMLSwitch\fP, \fBSoVRMLGroup\fP, \fBSoVRMLLOD\fP, \fBSoVRMLTransform\fP, \fBSoSeparator\fP, \fBSoArray\fP, \fBSoSwitch\fP, \fBSoLOD\fP, \fBSoMultipleCopy\fP, \fBSoPathSwitch\fP, \fBSoLevelOfDetail\fP, and \fBSoTransformSeparator\fP\&. .SS "\fBSoChildList\fP * SoGroup::getChildren (void) const\fC [virtual]\fP" Returns list of children\&. .PP Reimplemented from \fBSoNode\fP\&. .PP Reimplemented in \fBSoVRMLSwitch\fP, \fBSoVRMLLOD\fP, and \fBSoVRMLParent\fP\&. .SS "SbBool SoGroup::readInstance (\fBSoInput\fP *in, unsigned shortflags)\fC [protected]\fP, \fC [virtual]\fP" This method is mainly intended for internal use during file import operations\&. .PP It reads a definition of an instance from the input stream \fIin\fP\&. The input stream state points to the start of a serialized / persistant representation of an instance of this class type\&. .PP \fCTRUE\fP or \fCFALSE\fP is returned, depending on if the instantiation and configuration of the new object of this class type went ok or not\&. The import process should be robust and handle corrupted input streams by returning \fCFALSE\fP\&. .PP \fIflags\fP is used internally during binary import when reading user extension nodes, group nodes or engines\&. .PP Reimplemented from \fBSoNode\fP\&. .PP Reimplemented in \fBSoVRMLSwitch\fP, \fBSoVRMLLOD\fP, \fBSoSeparator\fP, and \fBSoVRMLParent\fP\&. .SS "SbBool SoGroup::readChildren (\fBSoInput\fP *in)\fC [protected]\fP, \fC [virtual]\fP" Read all children of this node from \fIin\fP and attach them below this group in left-to-right order\&. Returns \fCFALSE\fP upon read error\&. .SS "void SoGroup::copyContents (const \fBSoFieldContainer\fP *from, SbBoolcopyconnections)\fC [protected]\fP, \fC [virtual]\fP" Makes a deep copy of all data of \fIfrom\fP into this instance, \fIexcept\fP external scenegraph references if \fIcopyconnections\fP is \fCFALSE\fP\&. .PP This is the protected method that should be overridden by extension node / engine / dragger / whatever subclasses which needs to account for internal data that are not handled automatically\&. .PP For copying nodes from application code, you should not invoke this function directly, but rather call the \fBSoNode::copy()\fP function: .PP .PP .nf SoNode * mynewnode = templatenode->copy(); .fi .PP .PP The same also goes for engines\&. .PP Make sure that when you override the \fBcopyContents()\fP method in your extension class that you also make it call upwards to it's parent superclass in the inheritance hierarchy, as \fBcopyContents()\fP in for instance \fBSoNode\fP and \fBSoFieldContainer\fP does important work\&. It should go something like this: .PP .PP .nf void MyCoinExtensionNode::copyContents(const SoFieldContainer * from, SbBool copyconnections) { // let parent superclasses do their thing (copy fields, copy // instance name, etc etc) SoNode::copyContents(from, copyconnections); // [\&.\&.then copy internal data\&.\&.] } .fi .PP .PP Reimplemented from \fBSoNode\fP\&. .PP Reimplemented in \fBSoVRMLSwitch\fP, \fBSoVRMLLOD\fP, and \fBSoVRMLParent\fP\&. .SH "Member Data Documentation" .PP .SS "\fBSoChildList\fP * SoGroup::children\fC [protected]\fP" List of managed child nodes\&. .PP Reimplemented in \fBSoVRMLParent\fP\&. .SH "Author" .PP Generated automatically by Doxygen for Coin from the source code\&.