1SoLevelOfDetail(3IV)()                                  SoLevelOfDetail(3IV)()
2
3
4

NAME

6       SoLevelOfDetail — level-of-detail switching group node
7

INHERITS FROM

9       SoBase > SoFieldContainer > SoNode > SoGroup > SoLevelOfDetail
10

SYNOPSIS

12       #include <Inventor/nodes/SoLevelOfDetail.h>
13
14          Fields from class SoLevelOfDetail:
15
16     SoMFFloat           screenArea
17
18          Methods from class SoLevelOfDetail:
19
20                         SoLevelOfDetail()
21     static SoType       getClassTypeId()
22
23          Methods from class SoGroup:
24
25     void                addChild(SoNode *child)
26     void                insertChild(SoNode *child, int newChildIndex)
27     SoNode *            getChild(int index) const
28     int                 findChild(const SoNode *child) const
29     int                 getNumChildren() const
30     void                removeChild(int index)
31     void                removeChild(SoNode *child)
32     void                removeAllChildren()
33     void                replaceChild(int index, SoNode *newChild)
34     void                replaceChild(SoNode *oldChild, SoNode *newChild)
35
36          Methods from class SoNode:
37
38     void                setOverride(SbBool state)
39     SbBool              isOverride() const
40     SoNode *            copy(SbBool copyConnections = FALSE) const
41     virtual SbBool      affectsState() const
42     static SoNode *     getByName(const SbName &name)
43     static int          getByName(const SbName &name, SoNodeList &list)
44
45          Methods from class SoFieldContainer:
46
47     void                setToDefaults()
48     SbBool              hasDefaultValues() const
49     SbBool              fieldsAreEqual(const SoFieldContainer *fc) const
50     void                copyFieldValues(const  SoFieldContainer  *fc,  SbBool
51                              copyConnections = FALSE)
52     SbBool              set(const char *fieldDataString)
53     void                get(SbString &fieldDataString)
54     virtual int         getFields(SoFieldList &resultList) const
55     virtual SoField *   getField(const SbName &fieldName) const
56     SbBool              getFieldName(const SoField *field, SbName &fieldName)
57                              const
58     SbBool              isNotifyEnabled() const
59     SbBool              enableNotify(SbBool flag)
60
61          Methods from class SoBase:
62
63     void                ref()
64     void                unref() const
65     void                unrefNoDelete() const
66     void                touch()
67     virtual SoType      getTypeId() const
68     SbBool              isOfType(SoType type) const
69     virtual void        setName(const SbName &name)
70     virtual SbName      getName() const
71
72

DESCRIPTION

74       The  children  of  this  node  typically  represent  the same object or
75       objects at varying levels of detail, from highest detail to lowest. The
76       size  of the objects when projected into the viewport is used to deter‐
77       mine which version to use (i.e., which child to traverse).
78
79       The size is computed as the area of the screen rectangle enclosing  the
80       projection  of  the  3D bounding box that encloses all of the children.
81       When rendering, this size is compared to the values in  the  screenArea
82       field.  If  the  size  is greater than the first value, child 0 is tra‐
83       versed. If it is smaller than the first, but greater than  the  second,
84       child  1  is traversed, and so on. If there are fewer children than are
85       required by this rule, the last  child  is  traversed.  The  screenArea
86       field  contains  just  0  by default, so the first child is always tra‐
87       versed.
88
89       The size calculation takes the current complexity into account. If  the
90       complexity  is  0  or is of type BOUNDING_BOX, the last child is always
91       traversed. If the complexity is less than  .5,  the  computed  size  is
92       scaled down appropriately to use (possibly) a less detailed representa‐
93       tion. If the complexity is greater than .5, the size is scaled  up.  At
94       complexity 1, the first child is always used.
95
96       Note  that  the  SoLOD  node  is similar to SoLevelOfDetail, except the
97       switching between levels in the SoLOD node is based  on  distance  from
98       the camera, which is faster than using screen area.
99

FIELDS

101     SoMFFloat           screenArea
102          Areas to use for comparison
103
104

METHODS

106                         SoLevelOfDetail()
107          Creates a level-of-detail node with default settings.
108
109     static SoType       getClassTypeId()
110          Returns type identifier for this class.
111
112

ACTION BEHAVIOR

114       SoGLRenderAction, SoRayPickAction, SoCallbackAction
115          Only the child with the appropriate level of detail is traversed.
116
117     SoGetBoundingBoxAction
118          The  box  that  encloses  all children is computed. (This is the box
119          that is needed to compute the projected size.)
120
121     others
122          All implemented as for SoGroup.
123
124

FILE FORMAT/DEFAULTS

126       LevelOfDetail {
127          screenArea  0
128     }
129

SEE ALSO

131       SoLOD, SoComplexity, SoSwitch, SoGroup
132
133
134
135
136                                                        SoLevelOfDetail(3IV)()
Impressum