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
public class SoGroup extends SoNode
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 asSoSeparator
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 ofSoGroup
as well.- See Also:
SoArray
,SoLevelOfDetail
,SoMultipleCopy
,SoPathSwitch
,SoSeparator
,SoSwitch
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.openinventor.inventor.nodes.SoNode
SoNode.RenderModes
-
Nested classes/interfaces inherited from class com.openinventor.inventor.Inventor
Inventor.ConstructorCommand
-
-
Field Summary
Fields Modifier and Type Field Description SoSFBool
boundingBoxIgnoring
Whether to ignore this node during bounding box traversal.-
Fields inherited from class com.openinventor.inventor.Inventor
VERBOSE_LEVEL, ZeroHandle
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addChild(SoNode child)
Adds a child as last one in group.int
findChild(SoNode child)
Finds index of given child within group.SoNode
getChild(int index)
Returns pointer the child node with the given index.int
getNumChildren()
Returns number of children.void
insertChild(SoNode child, int newChildIndex)
Adds a child so that it becomes the one with the given index.void
removeAllChildren()
Removes all children from group.void
removeChild(int index)
Removes child with given index from group.void
removeChild(SoNode child)
Removes first instance of given child 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.-
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, write
-
Methods inherited from class com.openinventor.inventor.fields.SoFieldContainer
copyFieldValues, copyFieldValues, enableNotify, fieldsAreEqual, get, getAllFields, getEventIn, getEventOut, getField, getFieldName, hasDefaultValues, isNotifyEnabled, set, setToDefaults
-
Methods inherited from class com.openinventor.inventor.misc.SoBase
dispose, getName, isDisposable, isSynchronizable, setName, setSynchronizable
-
Methods inherited from class com.openinventor.inventor.Inventor
getNativeResourceHandle
-
-
-
-
Field Detail
-
boundingBoxIgnoring
public final SoSFBool boundingBoxIgnoring
Whether to ignore this node during bounding box traversal. Default is false.
-
-
Method Detail
-
getNumChildren
public int getNumChildren()
Returns number of children.
-
replaceChild
public void replaceChild(SoNode oldChild, SoNode newChild)
Replaces first instance of given child with new child.
-
getChild
public SoNode getChild(int index)
Returns pointer the child node with the given index.
-
findChild
public int findChild(SoNode child)
Finds index of given child within group. Returns -1 if not found.
-
replaceChild
public void replaceChild(int index, SoNode newChild)
Replaces child with given index with new child.
-
removeAllChildren
public void removeAllChildren()
Removes all children from group.
-
removeChild
public void removeChild(SoNode child)
Removes first instance of given child from group.
-
addChild
public void addChild(SoNode child)
Adds a child as last one in group.
-
insertChild
public void insertChild(SoNode child, int newChildIndex)
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.
-
-