SoComplexity — shape complexity node
Contents
Action Behavior
SoGLRenderAction,SoCallbackAction,SoGetBoundingBoxAction,SoRayPickAction
Sets the current complexity in the state.
Description
This node sets the current shape complexity value. This is a heuristic value which provides a hint at
what geometric complexity to render shape nodes. Values range from 0 to 1, where 0 means minimum
complexity and 1 means maximum complexity. Each shape node interprets complexity in its own way.
Shape complexity always affects rendering and primitive generation for the SoCallbackAction. For some
shapes, it also affects picking.
There are three ways to interpret shape complexity, depending on the type field. BOUNDING_BOX complexity
ignores the value field and renders all shapes as bounding boxes, using the current material, drawing
style, etc. The other two types use the value field to determine the tessellation of shapes into
polygons. OBJECT_SPACE complexity uses value directly to determine the tessellation. SCREEN_SPACE
complexity depends on value and the projected size of the shape on the screen; a value of 0 produces the
minimum tessellation for a shape, and a value of 1 produces a tessellation that is fine enough that each
edge of a polygon is about 1 or two pixels in length. Since the projected size depends on the camera
position, objects may be tessellated differently every frame if the camera is moving; note that this may
have adverse effects on render caching in SoSeparator nodes.
The SoComplexity node also sets a hint for the quality of textures applied to shapes, based on the value
of the textureQuality field. The texture quality will take effect at the next Texture2 node; Texture2
nodes previously traversed will not be affected.
Fields
SoSFEnumtype
How shape complexity is interpreted.
SoSFFloatvalue
Complexity value.
SoSFFloattextureQuality
Hint about texture quality. A value of 0 indicates that the fastest texturing should be used, while a
value of 1 indicates that the best quality texturing should be used.
File Format/Defaults
Complexity{typeOBJECT_SPACEvalue0.5textureQuality0.5}Inherits From
SoBase > SoFieldContainer > SoNode > SoComplexity
Methods
SoComplexity()
Creates a complexity node with default settings.
staticSoTypegetClassTypeId()
Returns type identifier for this class.
Name
SoComplexity — shape complexity node
See Also
SoShape,SoShapeHints,SoTexture2SoComplexity(3IV)()
Synopsis
#include<Inventor/nodes/SoComplexity.h>enumType{SoComplexity::SCREEN_SPACE Set complexity based on screen size
SoComplexity::OBJECT_SPACE Set complexity independent of screen size
SoComplexity::BOUNDING_BOX Draw all shapes as bounding boxes
}
Fields from class SoComplexity:
SoSFEnumtypeSoSFFloatvalueSoSFFloattextureQuality
Methods from class SoComplexity:
SoComplexity()staticSoTypegetClassTypeId()
Methods from class SoNode:
voidsetOverride(SbBoolstate)SbBoolisOverride()constSoNode*copy(SbBoolcopyConnections=FALSE)constvirtualSbBoolaffectsState()conststaticSoNode*getByName(constSbName&name)staticintgetByName(constSbName&name,SoNodeList&list)
Methods from class SoFieldContainer:
voidsetToDefaults()SbBoolhasDefaultValues()constSbBoolfieldsAreEqual(constSoFieldContainer*fc)constvoidcopyFieldValues(constSoFieldContainer*fc,SbBoolcopyConnections=FALSE)SbBoolset(constchar*fieldDataString)voidget(SbString&fieldDataString)virtualintgetFields(SoFieldList&resultList)constvirtualSoField*getField(constSbName&fieldName)constSbBoolgetFieldName(constSoField*field,SbName&fieldName)constSbBoolisNotifyEnabled()constSbBoolenableNotify(SbBoolflag)
Methods from class SoBase:
voidref()voidunref()constvoidunrefNoDelete()constvoidtouch()virtualSoTypegetTypeId()constSbBoolisOfType(SoTypetype)constvirtualvoidsetName(constSbName&name)virtualSbNamegetName()const