SOCOMPLEXITY(3iv)
π SoComplexity(3IV) π
okay bestie, pull up a chair, we're diving into SoComplexity from the 3IV manual β the shape complexity node, and she is lowkey the main character of your scene graph's tessellation budget β¨
πΈ NAME πΈ
SoComplexity β shape complexity node. that's it, that's the vibe π
π¦ INHERITS FROM π¦
SoBase > SoFieldContainer > SoNode > SoComplexity
she got the whole ancestry chain, generational excellence fr fr π
β¨ SYNOPSIS β¨
#include <Inventor/nodes/SoComplexity.h>
enum Type {
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:
SoSFEnum type
SoSFFloat value
SoSFFloat textureQuality
Methods from class SoComplexity:
SoComplexity()
static SoType getClassTypeId()
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 = FALSE)
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
π DESCRIPTION π
So this node sets the current shape complexity value. And ngl, it's a heuristic value β meaning it's a hint, a little suggestion, a whisper to your shape nodes about how much geometric complexity to render with π«Ά. Values range from 0 to 1, where 0 means minimum complexity and 1 means maximum complexity. And the way each shape node interprets complexity? entirely its own business. every shape is on its own journey, periodt.
Shape complexity always affects rendering and primitive generation for the SoCallbackAction. And for some shapes, it also affects picking π.
There are three ways to interpret shape complexity, depending on the type field:
BOUNDING_BOXcomplexity ignores thevaluefield entirely and renders all shapes as bounding boxes, using the current material, drawing style, etc.- The other two types use the
valuefield to determine the tessellation of shapes into polygons:OBJECT_SPACEcomplexity usesvaluedirectly to determine the tessellation.SCREEN_SPACEcomplexity depends onvalueand the projected size of the shape on the screen; a value of0produces the minimum tessellation for a shape, and a value of1produces a tessellation that is fine enough that each edge of a polygon is about1or two pixels in length.
π and here's the thing bestie β since the projected size depends on the camera position, objects may be tessellated differently every frame if the camera is moving. and that may have adverse effects on render caching in SoSeparator nodes. so likeβ¦ know that going in π
The SoComplexity node also sets a hint for the quality of textures applied to shapes, based on the value of the textureQuality field. And this one's got timing, okay β the texture quality will take effect at the next Texture2 node; Texture2 nodes previously traversed will not be affected. so order matters, iykyk β¨
π FIELDS π
SoSFEnumtypeβ how shape complexity is interpreted.SoSFFloatvalueβ complexity value.SoSFFloattextureQualityβ hint about texture quality. A value of0indicates that the fastest texturing should be used, while a value of1indicates that the best quality texturing should be used.
π METHODS π
SoComplexity()β creates a complexity node with default settings. baby's first complexity node πΌstatic SoType getClassTypeId()β returns type identifier for this class.
π₯ ACTION BEHAVIOR π₯
SoGLRenderAction, SoCallbackAction, SoGetBoundingBoxAction, SoRayPickAction
- sets the current complexity in the state. that's the whole job and she does it flawlessly π
π FILE FORMAT/DEFAULTS π
Complexity {
type OBJECT_SPACE
value 0.5
textureQuality 0.5
}
look at those defaults. OBJECT_SPACE, 0.5, 0.5. perfectly balanced, as all things should be β
π§ SEE ALSO π§
SoShape, SoShapeHints, SoTexture2
and that's the page!! footer says SoComplexity(3IV)() β that's the source/version-and-date stamp at the bottom, so consider this your official sign-off bestie π«Ά go forth and tessellate responsibly πβ¨π
π¦ where this page comes from
- debian bookworm: inventor-doc 2.1.5-10+dfsg-2 Β· LGPL-2.0-or-later
- debian trixie: inventor-doc 2.1.6+ds-2 Β· LGPL-2.0-or-later
- ubuntu jammy: inventor-doc 2.1.5-10-24
- ubuntu noble: inventor-doc 2.1.5-10+dfsg-2.1build2 Β· LGPL-2.0-or-later
- ubuntu questing: inventor-doc 2.1.6+ds-2
- ubuntu resolute: inventor-doc 2.1.6.1+ds-1 Β· LGPL-2.0-or-later
- ubuntu stonking: inventor-doc 2.1.6.1+ds-1 Β· LGPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms