Package com.openinventor.inventor.nodes
Class SoGroup
java.lang.Object
com.openinventor.inventor.Inventor
com.openinventor.inventor.misc.SoBase
com.openinventor.inventor.fields.SoFieldContainer
com.openinventor.inventor.nodes.SoNode
com.openinventor.inventor.nodes.SoGroup
- All Implemented Interfaces:
SafeDisposable
- Direct Known Subclasses:
SoArray,SoGeoLOD,SoLevelOfDetail,SoLOD,SoMultiPathSwitch,SoMultipleCopy,SoMultipleInstanceBase,SoMultiSwitch,SoNurbsGroup,SoOverlayGroup,SoPathSwitch,SoSeparator,SoShadowGroup,SoSwitch,SoTransformSeparator,SoVolumeClippingGroup,SoVolumeMaskGroup
Base class for all group nodes.
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).
File format/default:
Group {
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.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class com.openinventor.inventor.nodes.SoNode
SoNode.RenderModesNested classes/interfaces inherited from class com.openinventor.inventor.Inventor
Inventor.ConstructorCommand -
Field Summary
FieldsModifier and TypeFieldDescriptionfinal SoSFBoolWhether to ignore this node during bounding box traversal.Fields inherited from class com.openinventor.inventor.Inventor
VERBOSE_LEVEL, ZeroHandle -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidAdds a child as last one in group.intFinds index of given child within group.getChild(int index) Returns pointer the child node with the given index.intReturns number of children.voidinsertChild(SoNode child, int newChildIndex) Adds a child so that it becomes the one with the given index.voidRemoves all children from group.voidremoveChild(int index) Removes child with given index from group.voidremoveChild(SoNode child) Removes first instance of given child from group.voidreplaceChild(int index, SoNode newChild) Replaces child with given index with new child.voidreplaceChild(SoNode oldChild, SoNode newChild) Replaces first instance of given child with new child.Methods inherited from class com.openinventor.inventor.nodes.SoNode
affectsState, callback, copy, copy, distribute, doAction, getAlternateRep, getBoundingBox, getByName, getMatrix, getPrimitiveCount, getRenderEngineMode, getRenderUnitID, GLRender, GLRenderBelowPath, GLRenderInPath, GLRenderOffPath, grabEventsCleanup, grabEventsSetup, handleEvent, isBoundingBoxIgnoring, isOverride, pick, rayPick, search, setOverride, touch, writeMethods inherited from class com.openinventor.inventor.fields.SoFieldContainer
copyFieldValues, copyFieldValues, enableNotify, fieldsAreEqual, get, getAllFields, getEventIn, getEventOut, getField, getFieldName, hasDefaultValues, isNotifyEnabled, set, setToDefaultsMethods inherited from class com.openinventor.inventor.misc.SoBase
dispose, getName, isDisposable, isSynchronizable, setName, setSynchronizableMethods inherited from class com.openinventor.inventor.Inventor
getNativeResourceHandle
-
Field Details
-
boundingBoxIgnoring
Whether to ignore this node during bounding box traversal. Default is false.
-
-
Constructor Details
-
SoGroup
public SoGroup()Creates an empty group node. -
SoGroup
public SoGroup(int nChildren) Constructor that takes approximate number of children. Space is allocated to contain the specified number of children, but the group does not contain any actual child nodes.
-
-
Method Details
-
getNumChildren
public int getNumChildren()Returns number of children. -
replaceChild
Replaces first instance of given child with new child. -
getChild
Returns pointer the child node with the given index. -
findChild
Finds index of given child within group. Returns -1 if not found. -
replaceChild
Replaces child with given index with new child. -
removeAllChildren
public void removeAllChildren()Removes all children from group. -
removeChild
Removes first instance of given child from group. -
addChild
Adds a child as last one in group. -
insertChild
Adds a child so that it becomes the one with the given index. -
removeChild
public void removeChild(int index) Removes child with given index from group.
-