1SoComplexity(3IV)()                                        SoComplexity(3IV)()
2
3
4

NAME

6       SoComplexity — shape complexity node
7

INHERITS FROM

9       SoBase > SoFieldContainer > SoNode > SoComplexity
10

SYNOPSIS

12       #include <Inventor/nodes/SoComplexity.h>
13
14     enum Type {
15          SoComplexity::SCREEN_SPACE  Set complexity based on screen size
16          SoComplexity::OBJECT_SPACE  Set  complexity  independent  of  screen
17                                           size
18          SoComplexity::BOUNDING_BOX  Draw all shapes as bounding boxes
19     }
20
21          Fields from class SoComplexity:
22
23     SoSFEnum            type
24     SoSFFloat           value
25     SoSFFloat           textureQuality
26
27          Methods from class SoComplexity:
28
29                         SoComplexity()
30     static SoType       getClassTypeId()
31
32          Methods from class SoNode:
33
34     void                setOverride(SbBool state)
35     SbBool              isOverride() const
36     SoNode *            copy(SbBool copyConnections = FALSE) const
37     virtual SbBool      affectsState() const
38     static SoNode *     getByName(const SbName &name)
39     static int          getByName(const SbName &name, SoNodeList &list)
40
41          Methods from class SoFieldContainer:
42
43     void                setToDefaults()
44     SbBool              hasDefaultValues() const
45     SbBool              fieldsAreEqual(const SoFieldContainer *fc) const
46     void                copyFieldValues(const  SoFieldContainer  *fc,  SbBool
47                              copyConnections = FALSE)
48     SbBool              set(const char *fieldDataString)
49     void                get(SbString &fieldDataString)
50     virtual int         getFields(SoFieldList &resultList) const
51     virtual SoField *   getField(const SbName &fieldName) const
52     SbBool              getFieldName(const SoField *field, SbName &fieldName)
53                              const
54     SbBool              isNotifyEnabled() const
55     SbBool              enableNotify(SbBool flag)
56
57          Methods from class SoBase:
58
59     void                ref()
60     void                unref() const
61     void                unrefNoDelete() const
62     void                touch()
63     virtual SoType      getTypeId() const
64     SbBool              isOfType(SoType type) const
65     virtual void        setName(const SbName &name)
66     virtual SbName      getName() const
67
68

DESCRIPTION

70       This node sets the current shape complexity value. This is a  heuristic
71       value  which  provides  a  hint  at what geometric complexity to render
72       shape nodes. Values range from 0 to 1, where 0 means minimum complexity
73       and  1  means maximum complexity. Each shape node interprets complexity
74       in its own way.
75
76       Shape complexity always affects rendering and primitive generation  for
77       the SoCallbackAction. For some shapes, it also affects picking.
78
79       There  are  three  ways to interpret shape complexity, depending on the
80       type field. BOUNDING_BOX complexity ignores the value field and renders
81       all  shapes  as  bounding  boxes,  using  the current material, drawing
82       style, etc. The other two types use the value field  to  determine  the
83       tessellation  of  shapes  into  polygons.  OBJECT_SPACE complexity uses
84       value directly to determine the tessellation.  SCREEN_SPACE  complexity
85       depends  on  value and the projected size of the shape on the screen; a
86       value of 0 produces the minimum tessellation for a shape, and  a  value
87       of  1  produces  a tessellation that is fine enough that each edge of a
88       polygon is about 1 or two pixels in length. Since  the  projected  size
89       depends  on the camera position, objects may be tessellated differently
90       every frame if the camera is moving; note that this  may  have  adverse
91       effects on render caching in SoSeparator nodes.
92
93       The  SoComplexity  node  also  sets  a hint for the quality of textures
94       applied to shapes, based on the value of the textureQuality field.  The
95       texture  quality  will  take effect at the next Texture2 node; Texture2
96       nodes previously traversed will not be affected.
97

FIELDS

99     SoSFEnum            type
100          How shape complexity is interpreted.
101
102     SoSFFloat           value
103          Complexity value.
104
105     SoSFFloat           textureQuality
106          Hint about texture quality. A value of 0 indicates that the  fastest
107          texturing should be used, while a value of 1 indicates that the best
108          quality texturing should be used.
109
110

METHODS

112                         SoComplexity()
113          Creates a complexity node with default settings.
114
115     static SoType       getClassTypeId()
116          Returns type identifier for this class.
117
118

ACTION BEHAVIOR

120       SoGLRenderAction, SoCallbackAction, SoGetBoundingBoxAction,  SoRayPick‐
121       Action
122          Sets the current complexity in the state.
123
124

FILE FORMAT/DEFAULTS

126       Complexity {
127          type            OBJECT_SPACE
128          value           0.5
129          textureQuality  0.5
130     }
131

SEE ALSO

133       SoShape, SoShapeHints, SoTexture2
134
135
136
137
138                                                           SoComplexity(3IV)()
Impressum