public class SoComplexity extends SoNode
Shape complexity (value
field)
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.
value
field and renders all shapes as bounding boxes. Each bounding box shape is drawn as if it were an SoCube
and is subject to all of the drawing attributes of an SoCube
(current material, drawing style, etc.) except that texturing is not applied. The other two types use the value
field to determine the tessellation of shapes into polygons.
value
directly to determine the tessellation.
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 following is a sampling of the effects of shape complexity.
SoCone
, SoCube
, etc): controls number of faces generated.
SoMarkerSet
, SoPointSet
, etc): controls the number of markers/points actually drawn.
SoText3
, etc): controls tesselation of glyph edges in renderStyle POLYGON. textureQuality
.)
SoNurbsCurve
, SoNurbsSurface
, etc): controls tesselation of the curve/surface.
SoCircularExtrusion
: controls decimation of the extruded geometry.
SoVolumeRender
): controls the number of times the volume is sampled along each ray when the numSlicesControl field is set to AUTOMATIC.
SoHeightFieldRender
): controls tesselation of the height field (how many triangles are generated for rendering).
Texture quality
The SoComplexity
node also controls the quality of textures applied to shapes, based on the value of the textureQuality
field.
For texture nodes (SoTexture2
, SoTextureCubeMap
, etc), textureQuality controls the OpenGL minFilter, magFilter and mipmap settings that the hardware will use when applying the texture image to the geometry. With the default value (0.5) textures are not interpolated. We recommend using a higher value, e.g. 0.75, on modern graphics hardware.
For text nodes (SoText2
, SoText3
, etc), when the SoFont
renderStyle field is set to TEXTURE, the OpenGL settings controlled by textureQuality strongly affect the quality of the text rendering. With the default value (0.5) textures are not interpolated, so text may appear to not be anti-aliased. We recommend using a higher value, e.g. 0.75, on modern graphics hardware.
In a few cases, e.g. SoImageBackground
, setting textureQuality to zero disables rendering complexity.
File format/default:
Complexity {
type | OBJECT_SPACE |
value | 0.5 |
textureQuality | 0.5 |
bboxType | BBOX_AABB |
Action behavior:
SoGLRenderAction
, SoCallbackAction
, SoGetBoundingBoxAction
, SoRayPickAction
Sets the current complexity in the state. Sets: SoComplexityElement
, SoComplexityTypeElement
, SoTextureQualityElement
See also:
Modifier and Type | Class and Description |
---|---|
static class |
SoComplexity.BboxTypes
Bounding box type.
|
static class |
SoComplexity.Types
Type.
|
Inventor.ConstructorCommand
Modifier and Type | Field and Description |
---|---|
static int |
BBOX_AABB
Deprecated.
Use
SoComplexity.BboxTypes.BBOX_AABB instead. |
static int |
BBOX_OOB
Deprecated.
Use
SoComplexity.BboxTypes.BBOX_OOB instead. |
SoSFEnum<SoComplexity.BboxTypes> |
bboxType
Bounding box type to use.
|
static int |
BOUNDING_BOX
Deprecated.
Use
SoComplexity.Types.BOUNDING_BOX instead. |
static int |
OBJECT_SPACE
Deprecated.
Use
SoComplexity.Types.OBJECT_SPACE instead. |
static int |
SCREEN_SPACE
Deprecated.
Use
SoComplexity.Types.SCREEN_SPACE instead. |
SoSFFloat |
textureQuality
Hint about texture quality.
|
SoSFEnum<SoComplexity.Types> |
type
How shape complexity is interpreted.
|
SoSFFloat |
value
Complexity value.
|
VERBOSE_LEVEL, ZeroHandle
Constructor and Description |
---|
SoComplexity()
Creates a complexity node with default settings.
|
affectsState, callback, copy, copy, distribute, doAction, getAlternateRep, getBoundingBox, getByName, getMatrix, getPrimitiveCount, getRenderUnitID, GLRender, GLRenderBelowPath, GLRenderInPath, GLRenderOffPath, grabEventsCleanup, grabEventsSetup, handleEvent, isBoundingBoxIgnoring, isOverride, pick, rayPick, search, setOverride, touch, write
copyFieldValues, copyFieldValues, enableNotify, fieldsAreEqual, get, getAllFields, getEventIn, getEventOut, getField, getFieldName, hasDefaultValues, isNotifyEnabled, set, setToDefaults
dispose, getEXTERNPROTO, getName, getPROTO, isDisposable, isSynchronizable, setName, setSynchronizable
getAddress, getNativeResourceHandle, startInternalThreads, stopInternalThreads
@Deprecated public static final int OBJECT_SPACE
SoComplexity.Types.OBJECT_SPACE
instead.@Deprecated public static final int SCREEN_SPACE
SoComplexity.Types.SCREEN_SPACE
instead.@Deprecated public static final int BOUNDING_BOX
SoComplexity.Types.BOUNDING_BOX
instead.@Deprecated public static final int BBOX_AABB
SoComplexity.BboxTypes.BBOX_AABB
instead.@Deprecated public static final int BBOX_OOB
SoComplexity.BboxTypes.BBOX_OOB
instead.public final SoSFEnum<SoComplexity.Types> type
public final SoSFFloat value
public final SoSFFloat textureQuality
For backward compatibility, the default value is 0.5. This value was chosen when texturing was an expensive (low performance) feature of graphics hardware. It produces relatively low quality texture rendering because no interpolation is done. On modern graphics hardware we recommend setting this to a higher value, e.g. 0.75.
If the filter options are set explicitly in the SoTexture.minFilter
and/or SoTexture.magFilter
fields, this field has no effect.
The table below shows the correspondence between Open Inventor texture quality and OpenGL texture filtering options.
textureQuality | * minFilter value | ** magFilter value | *** Need Mipmaps | Format |
<= 0.5 | GL_NEAREST | GL_NEAREST | false | ExtendedFormats or CompressedFormats |
<= 0.6 | GL_LINEAR | GL_NEAREST | false | ExtendedFormats or CompressedFormats |
<= 0.7 | GL_NEAREST_MIPMAP_NEAREST | GL_NEAREST | true | ExtendedFormats or CompressedFormats |
<= 0.8 | GL_NEAREST_MIPMAP_LINEAR | GL_LINEAR | true | InternalFormats or CompressedFormats |
<= 0.9 | GL_LINEAR_MIPMAP_NEAREST | GL_LINEAR | true | InternalFormats or CompressedFormats |
<= 1.0 | GL_LINEAR_MIPMAP_LINEAR | GL_LINEAR | true | InternalFormats or CompressedFormats |
* The minFilter value can be set explicitly using the SoTexture.minFilter
field of classes derived from SoTexture
.
** If quality < 0.75, magFilter = GL_NEAREST, otherwise magFilter = GL_LINEAR.
The magFilter value can be set explicitly using the SoTexture.magFilter
field of classes derived from SoTexture
.
*** Means that Open Inventor automatically generates mipmap textures. See the OpenGL Programming Guide for information on mipmap textures.
public final SoSFEnum<SoComplexity.BboxTypes> bboxType
Generated on January 23, 2025, Copyright © Thermo Fisher Scientific. All rights reserved. http://www.openinventor.com