SoLOD(3IV)NAMESoLOD (SoLOD) - distance-based level-of-detail switching group node
INHERITS FROM
SoBase > SoFieldContainer > SoNode > SoGroup > SoLODSYNOPSIS
#include <Inventor_c/nodes/SoLOD.h>
Fields from class SoLOD:
SoMFFloat range
SoSFVec3f center
Functions from class SoLOD:
SoLOD * SoLODCreate()
SoType SoLODGetClassTypeId()
Functions from class SoGroup:
void SoLODAddChild(SoLOD *this, SoNode *child)
void SoLODInsertChild(SoLOD *this, SoNode *child, int
newChildIndex)
SoNode * SoLODGetChild(const SoLOD *this, int index)
int SoLODFindChild(const SoLOD *this, const SoNode
*child)
int SoLODGetNumChildren(const SoLOD *this)
void SoLODRemoveChild(SoLOD *this, int index)
void SoLODRemoveChildNode(SoLOD *this, SoNode *child)
void SoLODRemoveAllChildren(SoLOD *this)
void SoLODReplaceChild(SoLOD *this, int index, SoNode
*newChild)
void SoLODReplaceChildNode(SoLOD *this, SoNode *oldChild,
SoNode *newChild)
Functions from class SoNode:
void SoLODSetOverride(SoLOD *this, SbBool state)
SbBool SoLODIsOverride(const SoLOD *this)
SoNode * SoLODCopy(const SoLOD *this, SbBool copyConnections =
FALSE)
SbBool SoLODAffectsState(const SoLOD *this)
SoNode * SoLODGetByName(const char *name)
int SoLODGetByNameList(const char *name, SoNodeList
*list)
Functions from class SoFieldContainer:
void SoLODSetToDflts(SoLOD *this)
SbBool SoLODHasDfltVals(const SoLOD *this)
Page 1SoLOD(3IV)
SbBool SoLODFldsAreEq(const SoLOD *this, const
SoFieldContainer *fc)
void SoLODCopyFieldVals(SoLOD *this, const
SoFieldContainer *fc, SbBool copyConnections =
FALSE)
SbBool SoLODSet(SoLOD *this, const char *fieldDataString)
void SoLODGet(SoLOD *this, SbString *fieldDataString)
int SoLODGetFields(const SoLOD *this, SoFieldList
*resultList)
SoField * SoLODGetField(const SoLOD *this, const char
*fieldName)
SbBool SoLODGetFieldName(const SoLOD *this, const SoField
*field, SbName *fieldName)
SbBool SoLODIsNotifyEnabled(const SoLOD *this)
SbBool SoLODEnableNotify(SoLOD *this, SbBool flag)
Functions from class SoBase:
void SoLODRef(SoLOD *this)
void SoLODUnref(const SoLOD *this)
void SoLODUnrefNoDelete(const SoLOD *this)
void SoLODTouch(SoLOD *this)
SoType SoLODGetTypeId(const SoLOD *this)
SbBool SoLODIsOfType(const SoLOD *this, SoType type)
void SoLODSetName(SoLOD *this, const char *name)
SbName SoLODGetName(const SoLOD *this)
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.
Page 2SoLOD(3IV)
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
SoMFFloat range
World-space distances to use as switching criteria.
SoSFVec3f center
Object-space center of the model.
FUNCTIONSSoLOD * SoLODCreate()
Creates a distance-based level-of-detail node with default settings.
SoType SoLODGetClassTypeId()
Returns type identifier for this class.
ACTION BEHAVIOR
SoGLRenderAction, SoRayPickAction, SoCallbackAction
Only the child with the appropriate level of detail is traversed.
others
All implemented as for SoGroup.
FILE FORMAT/DEFAULTS
LOD {
center 0 0 0
range [ ]
}
SEE ALSO
SoSwitch, SoGroup
Page 3