SoComplexity Class Reference
[Properties]

Shape complexity node. More...

#include <Inventor/nodes/SoComplexity.h>

Inheritance diagram for SoComplexity:
SoNode SoFieldContainer SoBase SoRefCounter SoTypedObject

List of all members.

Public Types

enum  Type {
  OBJECT_SPACE = SoComplexityTypeElement::OBJECT_SPACE,
  SCREEN_SPACE = SoComplexityTypeElement::SCREEN_SPACE,
  BOUNDING_BOX = SoComplexityTypeElement::BOUNDING_BOX
}
enum  BboxType {
  BBOX_AABB = SoBBoxTypeElement::BBOX_AABB,
  BBOX_OOB = SoBBoxTypeElement::BBOX_OOB
}

Public Member Functions

virtual SoType getTypeId () const
 SoComplexity ()
virtual void setOverride (const SbBool state)
virtual SbBool isOverride () const

Static Public Member Functions

static SoType getClassTypeId ()

Public Attributes

SoSFEnum type
SoSFFloat value
SoSFFloat textureQuality
SoSFEnum bboxType

Detailed Description

Shape complexity node.

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 (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.

The following is a sampling of the effects of shape complexity.

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

ACTION BEHAVIOR

SEE ALSO

SoShape, SoShapeHints, SoTexture2, SoInteractiveComplexity

See related examples:

MedicalVolumePipeClipping, VolumePipeClipping


Member Enumeration Documentation

Bounding box type.

Enumerator:
BBOX_AABB 

Axis Aligned Bounding Box (default).

BBOX_OOB 

Object Oriented Bounding box.

Type.

Enumerator:
OBJECT_SPACE 

Set complexity independent of screen size (default).

SCREEN_SPACE 

Set complexity based on screen size.

BOUNDING_BOX 

Draw all shapes as bounding boxes.


Constructor & Destructor Documentation

SoComplexity::SoComplexity (  ) 

Creates a complexity node with default settings.


Member Function Documentation

static SoType SoComplexity::getClassTypeId (  )  [static]

Returns the type identifier for this class.

Reimplemented from SoNode.

virtual SoType SoComplexity::getTypeId (  )  const [virtual]

Returns the type identifier for this specific instance.

Reimplemented from SoNode.

virtual SbBool SoComplexity::isOverride (  )  const [inline, virtual]

Returns the state of the override field.

Reimplemented from SoNode.

virtual void SoComplexity::setOverride ( const SbBool  state  )  [inline, virtual]

Set the state of the override field.

see SoNode::setOverride doc.

Reimplemented from SoNode.


Member Data Documentation

Bounding box type to use.

Use enum BboxType. Default is BBOX_AABB. By default an Axis Aligned Bounding Box (AABB) is used. It is simpler and faster to compute but may not be a good approximation of the shape's actual volume. Using an Object Oriented Bounding box is more compute intensive, but can provide a tighter volume box allowing better performance for actions such as culling, picking and selection. NOTE: field available since Open Inventor 8.1

Hint about texture quality.

Default is 0.5. 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. The default value can also be set using the environment variable OIV_TEXTURE_QUALITY (0.0 to 1.0).

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.

How shape complexity is interpreted.

Use enum Type. Default is OBJECT_SPACE. The default value can also be set using the environment variable OIV_COMPLEXITY_TYPE.

Complexity value.

Default is 0.5. The default value can also be set using the environment variable OIV_COMPLEXITY (0.0 to 1.0).


The documentation for this class was generated from the following file:

Open Inventor Toolkit reference manual, generated on 15 Mar 2023
Copyright © Thermo Fisher Scientific All rights reserved.
http://www.openinventor.com/