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


       SoLevelOfDetail — level-of-detail switching group node


       SoBase > SoFieldContainer > SoNode > SoGroup > SoLevelOfDetail


       #include <Inventor/nodes/SoLevelOfDetail.h>

          Fields from class SoLevelOfDetail:

     SoMFFloat           screenArea

          Methods from class SoLevelOfDetail:

     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 =
     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


       The children of this node typically represent the same object or objects at varying levels
       of  detail, from highest detail to lowest. The size of the objects when projected into the
       viewport is used to determine which version to use (i.e., which child to traverse).

       The size is computed as the area of the screen rectangle enclosing the projection  of  the
       3D  bounding  box that encloses all of the children. When rendering, this size is compared
       to the values in the screenArea field. If the size is greater than the first value,  child
       0  is  traversed. If it is smaller than the first, but greater than the second, child 1 is
       traversed, and so on. If there are fewer children than are required by this rule, the last
       child is traversed. The screenArea field contains just 0 by default, so the first child is
       always traversed.

       The size calculation takes the current complexity into account. If the complexity is 0  or
       is  of  type  BOUNDING_BOX,  the last child is always traversed. If the complexity is less
       than .5, the computed size is scaled down appropriately to use (possibly) a less  detailed
       representation. If the complexity is greater than .5, the size is scaled up. At complexity
       1, the first child is always used.

       Note that the SoLOD node is similar  to  SoLevelOfDetail,  except  the  switching  between
       levels  in the SoLOD node is based on distance from the camera, which is faster than using
       screen area.


     SoMFFloat           screenArea
          Areas to use for comparison


          Creates a level-of-detail node with default settings.

     static SoType       getClassTypeId()
          Returns type identifier for this class.


       SoGLRenderAction, SoRayPickAction, SoCallbackAction
          Only the child with the appropriate level of detail is traversed.

          The box that encloses all children is computed. (This is the  box  that  is  needed  to
          compute the projected size.)

          All implemented as for SoGroup.


       LevelOfDetail {
          screenArea  0


       SoLOD, SoComplexity, SoSwitch, SoGroup