Provided by: inventor-doc_2.1.5-10-18_all bug

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:

     SoMFFloat           range
     SoSFVec3f           center

          Methods from class SoLOD:

                         SoLOD()
     static SoType       getClassTypeId()

          Methods from class SoGroup:

     void                addChild(SoNode *child)
     void                insertChild(SoNode *child, int newChildIndex)
     SoNode *            getChild(int index) const
     int                 findChild(const SoNode *child) const
     int                 getNumChildren() const
     void                removeChild(int index)
     void                removeChild(SoNode *child)
     void                removeAllChildren()
     void                replaceChild(int index, SoNode *newChild)
     void                replaceChild(SoNode *oldChild, SoNode *newChild)

          Methods from class SoNode:

     void                setOverride(SbBool state)
     SbBool              isOverride() const
     SoNode *            copy(SbBool copyConnections = FALSE) const
     virtual SbBool      affectsState() const
     static SoNode *     getByName(const SbName &name)
     static int          getByName(const SbName &name, SoNodeList &list)

          Methods from class SoFieldContainer:

     void                setToDefaults()
     SbBool              hasDefaultValues() const
     SbBool              fieldsAreEqual(const SoFieldContainer *fc) const
     void                copyFieldValues(const  SoFieldContainer  *fc,  SbBool  copyConnections =
                              FALSE)
     SbBool              set(const char *fieldDataString)
     void                get(SbString &fieldDataString)
     virtual int         getFields(SoFieldList &resultList) const
     virtual SoField *   getField(const SbName &fieldName) const
     SbBool              getFieldName(const SoField *field, SbName &fieldName) const
     SbBool              isNotifyEnabled() const
     SbBool              enableNotify(SbBool flag)

          Methods from class SoBase:

     void                ref()
     void                unref() const
     void                unrefNoDelete() const
     void                touch()
     virtual SoType      getTypeId() const
     SbBool              isOfType(SoType type) const
     virtual void        setName(const SbName &name)
     virtual SbName      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

     SoMFFloat           range
          World-space distances to use as switching criteria.

     SoSFVec3f           center
          Object-space center of the model.

METHODS

                         SoLOD()
          Creates a distance-based level-of-detail node with default settings.

     static SoType       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

                                                                                     SoLOD(3IV)()