man SoLOD () - distance-based level-of-detail switching group node

NAME

SoLOD - distance-based level-of-detail switching group node

INHERITS FROM

SoBase > SoFieldContainer > SoNode > SoGroup > SoLOD

SYNOPSIS

#include <Inventor/nodes/SoLOD.h> Fields from class SoLOD: c } c } range

c } c } center Methods from class SoLOD: c } c } SoLOD()

c } c } getClassTypeId() Methods from class SoGroup: c } c } addChild(SoNode *child)

c } c } insertChild(SoNode *child, int newChildIndex)

c } c } getChild(int index) const

c } c } findChild(const SoNode *child) const

c } c } getNumChildren() const

c } c } removeChild(int index)

c } c } removeChild(SoNode *child)

c } c } removeAllChildren()

c } c } replaceChild(int index, SoNode *newChild)

c } c } replaceChild(SoNode *oldChild, SoNode *newChild) Methods from class SoNode: c } c } setOverride(SbBool state)

c } c } isOverride() const

c } c } copy(SbBool copyConnections = FALSE) const

c } c } affectsState() const

c } c } getByName(const SbName &name)

c } c } getByName(const SbName &name, SoNodeList &list) Methods from class SoFieldContainer: c } c } setToDefaults()

c } c } hasDefaultValues() const

c } c } fieldsAreEqual(const SoFieldContainer *fc) const

c } c } copyFieldValues(const SoFieldContainer *fc, SbBool copyConnections = FALSE)

c } c } set(const char *fieldDataString)

c } c } get(SbString &fieldDataString)

c } c } getFields(SoFieldList &resultList) const

c } c } getField(const SbName &fieldName) const

c } c } getFieldName(const SoField *field, SbName &fieldName) const

c } c } isNotifyEnabled() const

c } c } enableNotify(SbBool flag) Methods from class SoBase: c } c } ref()

c } c } unref() const

c } c } unrefNoDelete() const

c } c } touch()

c } c } getTypeId() const

c } c } isOfType(SoType type) const

c } c } setName(const SbName &name)

c } c } getName() const

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

c } c } range

World-space distances to use as switching criteria. c } c } center

Object-space center of the model.

METHODS

c } c } SoLOD()

Creates a distance-based level-of-detail node with default settings. c } c } getClassTypeId()

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