SoComplexity Class |
Shape complexity node.
Namespace: OIV.Inventor.Nodes
The SoComplexity type exposes the following members.
Name | Description | |
---|---|---|
SoComplexity | Creates a complexity node with default settings. |
Name | Description | |
---|---|---|
AffectsState | Returns true if a node has an effect on the state during traversal. | |
Callback | (Overrides SoNodeCallback(SoCallbackAction).) | |
Copy | Calls Copy(false). (Inherited from SoNode.) | |
Copy(Boolean) | Creates and returns an exact copy of the node. | |
CopyFieldValues(SoFieldContainer) | Calls CopyFieldValues(fc, false). (Inherited from SoFieldContainer.) | |
CopyFieldValues(SoFieldContainer, Boolean) | Copies the contents of fc's fields into this object's fields. | |
Dispose |
Releases all resources used by SoDisposable.
(Inherited from SoDisposable.) | |
Distribute | (Inherited from SoNode.) | |
DoAction | (Overrides SoNodeDoAction(SoAction).) | |
EnableNotify | Notification at this Field Container is enabled (if flag == true) or disabled (if flag == false). | |
Equals | Determines whether the specified Object is equal to the current Object. (Inherited from Object.) | |
FieldsAreEqual | Returns true if this object's fields are exactly equal to fc's fields. | |
Get | Returns the values of the fields of this object in the Open Inventor ASCII file format in the given string. | |
GetAllFields | Returns a list of fields, including the eventIn's and eventOut's. | |
GetAlternateRep | This method is called by actions to allow the node to provide an "alternate representation" when appropriate (typically depending on the action type). | |
GetBoundingBox | (Overrides SoNodeGetBoundingBox(SoGetBoundingBoxAction).) | |
GetEventIn | Returns a the eventIn with the given name. | |
GetEventOut | Returns the eventOut with the given name. | |
GetField | Returns a the field of this object whose name is fieldName. | |
GetFieldName | Returns the name of the given field in the fieldName argument. | |
GetFields | Appends references to all of this object's fields to resultList, and returns the number of fields appended. | |
GetHashCode |
Overrides GetHashCode().
(Inherited from SoNetBase.) | |
GetMatrix | (Inherited from SoNode.) | |
GetName | Returns the name of an instance. | |
GetPrimitiveCount | (Overrides SoNodeGetPrimitiveCount(SoGetPrimitiveCountAction).) | |
GetRenderEngineMode | Returns the supported Render engine mode. | |
GetRenderUnitID | (Inherited from SoNode.) | |
GetStringName | (Inherited from SoBase.) | |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
GLRender | (Overrides SoNodeGLRender(SoGLRenderAction).) | |
GLRenderBelowPath | (Inherited from SoNode.) | |
GLRenderInPath | (Inherited from SoNode.) | |
GLRenderOffPath | (Inherited from SoNode.) | |
GrabEventsCleanup | (Inherited from SoNode.) | |
GrabEventsSetup | (Inherited from SoNode.) | |
HandleEvent | (Inherited from SoNode.) | |
HasDefaultValues | Returns true if all of the object's fields have their default values. | |
IsBoundingBoxIgnoring | This method is used by getBoundingBox action traversal to know if the current node must be traversed or not, ie the bounding should be ignored. | |
IsNotifyEnabled | Notification is the process of telling interested objects that this object has changed. | |
IsOverride | Returns the state of the override field. | |
IsSynchronizable | Gets the ScaleViz synchronizable state of this object. | |
Pick | (Overrides SoNodePick(SoPickAction).) | |
RayPick | (Inherited from SoNode.) | |
Search | (Inherited from SoNode.) | |
Set | Sets one or more fields in this object to the values specified in the given string, which should be a string in the Open Inventor file format. | |
SetName | (Inherited from SoBase.) | |
SetOverride | Set the state of the override field. | |
SetSynchronizable | Sets this to be a ScaleViz synchronizable object. | |
SetToDefaults | Sets all fields in this object to their default values. | |
ToString |
Converts this SoBase structure to a human readable string.
(Inherited from SoBase.) | |
Touch | Marks an instance as modified, simulating a change to it. | |
Write | (Inherited from SoNode.) |
Name | Description | |
---|---|---|
bboxType | Bounding box type to use. | |
IsDisposable | ISafeDisposable interface implementation.
(Inherited from SoDisposable.) | |
textureQuality | Hint about texture quality. | |
type | How shape complexity is interpreted. | |
UserData |
Gets or sets the user data to be contained by the field container.
(Inherited from SoFieldContainer.) | |
value | Complexity value. |
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 (OIV.Inventor.Nodes.SoComplexity.value field)
Shape complexity always affects rendering and primitive generation for the OIV.Inventor.Actions.SoCallbackAction. For some shapes, it also affects picking.
There are three ways to interpret shape complexity, depending on the OIV.Inventor.Nodes.SoComplexity.type field.
BOUNDING_BOX complexity ignores the OIV.Inventor.Nodes.SoComplexity.value field and renders all shapes as bounding boxes. Each bounding box shape is drawn as if it were an OIV.Inventor.Nodes.SoCube and is subject to all of the drawing attributes of an OIV.Inventor.Nodes.SoCube (current material, drawing style, etc.) except that texturing is not applied. The other two types use the OIV.Inventor.Nodes.SoComplexity.value field to determine the tessellation of shapes into polygons.
OBJECT_SPACE complexity (the default) uses OIV.Inventor.Nodes.SoComplexity.value directly to determine the tessellation.
SCREEN_SPACE complexity depends on OIV.Inventor.Nodes.SoComplexity.value and the projected size of the shape on the screen; a OIV.Inventor.Nodes.SoComplexity.value of 0 produces the minimum tessellation for a shape, and a OIV.Inventor.Nodes.SoComplexity.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 OIV.Inventor.Nodes.SoSeparator nodes.
The following is a sampling of the effects of shape complexity.
Simple shapes (OIV.Inventor.Nodes.SoCone, OIV.Inventor.Nodes.SoCube, etc): controls number of faces generated.
Markers/Points (OIV.Inventor.Nodes.SoMarkerSet, OIV.Inventor.Nodes.SoPointSet, etc): controls the number of markers/points actually drawn.
Text (OIV.Inventor.Nodes.SoText3, etc): controls tesselation of glyph edges in renderStyle POLYGON. (Quality in renderStyle TEXTURE is controlled by OIV.Inventor.Nodes.SoComplexity.textureQuality.)
NURBS (OIV.Inventor.Nodes.SoNurbsCurve, OIV.Inventor.Nodes.SoNurbsSurface, etc): controls tesselation of the curve/surface.
OIV.Inventor.Nodes.SoCircularExtrusion: controls decimation of the extruded geometry.
Volume rendering (OIV.VolumeViz.Nodes.SoVolumeRender): controls the number of times the volume is sampled along each ray when the numSlicesControl field is set to AUTOMATIC.
Height field rendering (OIV.VolumeViz.Nodes.SoHeightFieldRender): controls tesselation of the height field (how many triangles are generated for rendering).
Texture quality
The OIV.Inventor.Nodes.SoComplexity node also controls the quality of textures applied to shapes, based on the value of the OIV.Inventor.Nodes.SoComplexity.textureQuality field.
For texture nodes (OIV.Inventor.Nodes.SoTexture2, OIV.Inventor.Nodes.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 (OIV.Inventor.Nodes.SoText2, OIV.Inventor.Nodes.SoText3, etc), when the OIV.Inventor.Nodes.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. OIV.Inventor.Nodes.SoImageBackground, setting textureQuality to zero disables rendering complexity.
Complexity {
type | OBJECT_SPACE |
value | 0.5 |
textureQuality | 0.5 |
bboxType | BBOX_AABB |
OIV.Inventor.Actions.SoGLRenderAction, OIV.Inventor.Actions.SoCallbackAction, OIV.Inventor.Actions.SoGetBoundingBoxAction, OIV.Inventor.Actions.SoRayPickAction Sets the current complexity in the state. Sets: OIV.Inventor.Elements.SoComplexityElement, OIV.Inventor.Elements.SoComplexityTypeElement, OIV.Inventor.Elements.SoTextureQualityElement