1SoLOD(3IV)()                                                      SoLOD(3IV)()
2
3
4

NAME

6       SoLOD — distance-based level-of-detail switching group node
7

INHERITS FROM

9       SoBase > SoFieldContainer > SoNode > SoGroup > SoLOD
10

SYNOPSIS

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

DESCRIPTION

75       This group node is used to allow applications to switch between various
76       representations of objects automatically. The  children  of  this  node
77       typically  represent  the  same  object or objects at varying levels of
78       detail, from highest detail to lowest. The  distance  from  the  world-
79       space  eye  point to the transformed center of the LOD is computed, and
80       one child is drawn, based on the values in the ranges field.
81
82       More precisely, if the distance from the world-space  eyepoint  to  the
83       transformed center is D and the ranges array contains LAST_RANGE+1 val‐
84       ues (numbered 0...LAST_RANGE), then:
85
86
87
88              if D < ranges[0]                    : Child 0 is drawn
89              else if ranges[i-1] < D < ranges[i] : Child i is drawn
90              else if D > ranges[LAST_RANGE]      : Child LAST_RANGE+1 is drawn
91
92
93
94     Thus, N ranges and N+1 children should be specified. If you  specify  too
95     few  children,  the  last child will be used for the extra ranges. If you
96     specify too few ranges, the extra children will never be used.
97
98     It is often useful to define the lowest detail  child  to  be  an  SoInfo
99     node.  This causes the object to completely disappear if it is far enough
100     away from the eyepoint. Defining the highest detail child to be an SoInfo
101     node  can  also  be useful if you want the object to disappear if it gets
102     too close to the eyepoint.
103

FIELDS

105     SoMFFloat           range
106          World-space distances to use as switching criteria.
107
108     SoSFVec3f           center
109          Object-space center of the model.
110
111

METHODS

113                         SoLOD()
114          Creates a distance-based level-of-detail node with default settings.
115
116     static SoType       getClassTypeId()
117          Returns type identifier for this class.
118
119

ACTION BEHAVIOR

121       SoGLRenderAction, SoRayPickAction, SoCallbackAction
122          Only the child with the appropriate level of detail is traversed.
123
124     others
125          All implemented as for SoGroup.
126
127

FILE FORMAT/DEFAULTS

129       LOD {
130          center  0 0 0
131          range   [  ]
132     }
133

SEE ALSO

135       SoSwitch, SoGroup
136
137
138
139
140                                                                  SoLOD(3IV)()
Impressum