SoLOD — distance-based level-of-detail switching group node
Contents
Action Behavior
SoGLRenderAction,SoRayPickAction,SoCallbackAction
Only the child with the appropriate level of detail is traversed.
others
All implemented as for SoGroup.
Description
This group node is used to allow applications to switch between various representations of objects
automatically. The children of this node typically represent the same object or objects at varying levels
of detail, from highest detail to lowest. The distance from the world-space eye point to the transformed
center of the LOD is computed, and one child is drawn, based on the values in the ranges field.
More precisely, if the distance from the world-space eyepoint to the transformed center is D and the
ranges array contains LAST_RANGE+1 values (numbered 0...LAST_RANGE), then:
if D < ranges[0] : Child 0 is drawn
else if ranges[i-1] < D < ranges[i] : Child i is drawn
else if D > ranges[LAST_RANGE] : Child LAST_RANGE+1 is drawn
Thus, N ranges and N+1 children should be specified. If you specify too few children, the last child will
be used for the extra ranges. If you specify too few ranges, the extra children will never be used.
It is often useful to define the lowest detail child to be an SoInfo node. This causes the object to
completely disappear if it is far enough away from the eyepoint. Defining the highest detail child to be an
SoInfo node can also be useful if you want the object to disappear if it gets too close to the eyepoint.
Fields
SoMFFloatrange
World-space distances to use as switching criteria.
SoSFVec3fcenter
Object-space center of the model.
File Format/Defaults
LOD{center000range[]}Inherits From
SoBase > SoFieldContainer > SoNode > SoGroup > SoLOD
Methods
SoLOD()
Creates a distance-based level-of-detail node with default settings.
staticSoTypegetClassTypeId()
Returns type identifier for this class.
Name
SoLOD — distance-based level-of-detail switching group node
See Also
SoSwitch,SoGroupSoLOD(3IV)()
Synopsis
#include<Inventor/nodes/SoLOD.h>
Fields from class SoLOD:
SoMFFloatrangeSoSFVec3fcenter
Methods from class SoLOD:
SoLOD()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