SoSeparator — group node that saves and restores traversal state
Contents
Action Behavior
SoGLRenderAction,SoCallbackAction,SoGetBoundingBoxAction,SoGetMatrixAction,SoHandleEventAction,SoRayPickAction,SoSearchAction
Saves the current traversal state, traverses all children, and restores the previous traversal state.
Description
This group node performs a push (save) of the traversal state before traversing its children and a pop
(restore) after traversing them. This isolates the separator's children from the rest of the scene graph.
A separator can include lights, cameras, coordinates, normals, bindings, and all other properties.
Separators are relatively inexpensive, so they can be used freely within scenes.
The SoSeparator node provides caching of state during rendering and bounding box computation. This
feature can be enabled by setting the renderCaching and boundingBoxCaching fields. By default, these are
set to AUTO, which means that Inventor decides whether to build a cache based on internal heuristics.
Separators can also perform culling during rendering and picking. Culling skips over traversal of the
separator's children if they are not going to be rendered or picked, based on the comparison of the
separator's bounding box with the current view volume. Culling is controlled by the renderCulling and
pickCulling fields. These are also set to AUTO by default; however, render culling can be expensive (and
can interfere with render caching), so the AUTO heuristics leave it disabled unless specified otherwise.
Fields
SoSFEnumrenderCaching
Whether to cache during rendering traversal.
SoSFEnumboundingBoxCaching
Whether to cache during bounding box traversal.
SoSFEnumrenderCulling
Whether to cull during rendering traversal.
SoSFEnumpickCulling
Whether to cull during picking traversal.
File Format/Defaults
Separator{renderCachingAUTOboundingBoxCachingAUTOrenderCullingAUTOpickCullingAUTO}Inherits From
SoBase > SoFieldContainer > SoNode > SoGroup > SoSeparator
Methods
SoSeparator()
Creates a separator node with default settings.
SoSeparator(intnChildren)
Constructor that takes approximate number of children.
staticvoidsetNumRenderCaches(inthowMany)
By default, each separator node maintains 2 render caches. (This is to allow two different
representations, such as filled and wire-frame, to both be cached.) The setNumRenderCaches() method
sets the number of render caches each separator will have. Each render cache uses memory, so
increasing this number may increase the memory requirements of the application. This method affects
only separators that are created after it is called, not separators that were created before. Setting
the number of caches to 0 turns off render caching globally from then on.
staticintgetNumRenderCaches()
Returns the current number of render caches.
staticSoTypegetClassTypeId()
Returns type identifier for this class.
Name
SoSeparator — group node that saves and restores traversal state
See Also
SoSelection,SoTransformSeparatorSoSeparator(3IV)()
Synopsis
#include<Inventor/nodes/SoSeparator.h>enumCacheEnabled{SoSeparator::OFF Never build a cache
SoSeparator::ON Always try to build a cache
SoSeparator::AUTO Decide whether to cache based on some heuristic
}
Fields from class SoSeparator:
SoSFEnumrenderCachingSoSFEnumboundingBoxCachingSoSFEnumrenderCullingSoSFEnumpickCulling
Methods from class SoSeparator:
SoSeparator()SoSeparator(intnChildren)staticvoidsetNumRenderCaches(inthowMany)staticintgetNumRenderCaches()staticSoTypegetClassTypeId()
Methods from class SoGroup:
voidaddChild(SoNode*child)voidinsertChild(SoNode*child,intnewChildIndex)SoNode*getChild(intindex)constintfindChild(constSoNode*child)constintgetNumChildren()constvoidremoveChild(intindex)voidremoveChild(SoNode*child)voidremoveAllChildren()voidreplaceChild(intindex,SoNode*newChild)voidreplaceChild(SoNode*oldChild,SoNode*newChild)
Methods from class SoNode:
voidsetOverride(SbBoolstate)SbBoolisOverride()constSoNode*copy(SbBoolcopyConnections=FALSE)constvirtualSbBoolaffectsState()conststaticSoNode*getByName(constSbName&name)staticintgetByName(constSbName&name,SoNodeList&list)
Methods from class SoFieldContainer:
voidsetToDefaults()SbBoolhasDefaultValues()constSbBoolfieldsAreEqual(constSoFieldContainer*fc)constvoidcopyFieldValues(constSoFieldContainer*fc,SbBoolcopyConnections=FALSE)SbBoolset(constchar*fieldDataString)voidget(SbString&fieldDataString)virtualintgetFields(SoFieldList&resultList)constvirtualSoField*getField(constSbName&fieldName)constSbBoolgetFieldName(constSoField*field,SbName&fieldName)constSbBoolisNotifyEnabled()constSbBoolenableNotify(SbBoolflag)
Methods from class SoBase:
voidref()voidunref()constvoidunrefNoDelete()constvoidtouch()virtualSoTypegetTypeId()constSbBoolisOfType(SoTypetype)constvirtualvoidsetName(constSbName&name)virtualSbNamegetName()const