SoSimplifyAction Class Reference
[Actions]

VSG extension Abstract base class for simplifying scene graphs. More...

#include <Inventor/actions/SoSimplifyAction.h>

Inheritance diagram for SoSimplifyAction:
SoAction SoTypedObject SoGlobalSimplifyAction SoReorganizeAction SoShapeSimplifyAction

List of all members.

Public Member Functions

virtual SoType getTypeId () const
 SoSimplifyAction (SoSimplifier *_simplifier)
 ~SoSimplifyAction ()
void setSimplificationLevels (int num, const float levels[])
const float * getSimplificationLevels () const
int getNumSimplificationLevels () const
void setRanges (int num, const float newRanges[])
const float * getRanges () const
int getNumRanges () const
void setSizeFactor (float size)
float getSizeFactor () const
void setInlineLOD (SbBool i)
SbBool isInlineLOD () const
void setUrlName (const SbString name)
SbString getUrlName () const
void setVerbosity (SbBool v)
SbBool isVerbose () const
void setMinTriangles (int mt)
int getMinTriangles () const
void setRenderCulling (SbBool r)
int isRenderCulling () const

Static Public Member Functions

static SoType getClassTypeId ()

Detailed Description

VSG extension Abstract base class for simplifying scene graphs.

This class is the base class of the simplify actions that produce versions of a scene graph with fewer triangles. The simplify actions can generate either several simplified levels of the original geometry, grouped by a LevelOfSimplification node, or just one reduced level of detail. If a single level is computed, the action creates a single IndexedTriangleFaceSet.

Each simplified sub-levels can be stored in regular separators or in WWWInline nodes. In this case, the urlName defines the full url to use for each WWWInline. For instance if urlName = "dir/file", the action will generate "dir/file_1.wrl","dir/file_2.wrl", and so on. When a simplify action generates Level of Simplification nodes, the range field of each Level of Simplification node can be given globally in the range field of the simplify action. If the simplify action range field is not set, the simplify action computes it automatically for each LevelOfSimplification node. In this case, the sizeFactor field can be used to customize the range computation.

A minimum number of triangles can be set to stop the simplification when the object becomes too small. Specifying 0.0 for the last level inserts an empty node in the scene graph. This allows you to avoid rendering an object that is too small or too far from the viewer.

Available simplification actions are:

SEE ALSO

SoAction, SoLevelOfSimplification, SoGlobalSimplifyAction, SoShapeSimplifyAction, SoReorganizeAction


Constructor & Destructor Documentation

SoSimplifyAction::SoSimplifyAction ( SoSimplifier _simplifier  ) 

Constructor.

The algorithm used for simplifying is defined by the SoSimplifier class that is passed in the constructor.

SoSimplifyAction::~SoSimplifyAction (  ) 

Destructor.


Member Function Documentation

static SoType SoSimplifyAction::getClassTypeId (  )  [static]

Returns the type identifier for this class.

Reimplemented from SoAction.

Reimplemented in SoGlobalSimplifyAction, SoReorganizeAction, and SoShapeSimplifyAction.

int SoSimplifyAction::getMinTriangles (  )  const

Gets the minimum number of triangles for a simplified child.

int SoSimplifyAction::getNumRanges (  )  const

Gets the number of ranges that will be used in the LevelOfSimplification node to decide which level of detail to display.

int SoSimplifyAction::getNumSimplificationLevels (  )  const

Gets number of levels of detail to produce.

const float* SoSimplifyAction::getRanges (  )  const

Gets the ranges that will be used in the LevelOfSimplification node to decide which level of detail to display.

const float* SoSimplifyAction::getSimplificationLevels (  )  const

Gets percentages to produce at each level of detail.

float SoSimplifyAction::getSizeFactor (  )  const

Gets the scale factor to use to decide what values of ranges to use in the LevelOfSimplification node.

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

Returns the type identifier for this specific instance.

Implements SoTypedObject.

Reimplemented in SoGlobalSimplifyAction, SoReorganizeAction, and SoShapeSimplifyAction.

SbString SoSimplifyAction::getUrlName (  )  const

Gets the name used when creating Inline files for each simplified child.

SbBool SoSimplifyAction::isInlineLOD (  )  const

Gets inlineLOD flag.

If true, each simplified child is written into a separate file using SoWWWInline nodes.

int SoSimplifyAction::isRenderCulling (  )  const

Gets render culling flag.

If true, the "renderCulling" field will be set to ON for the Separators that hold each simplified level.

SbBool SoSimplifyAction::isVerbose (  )  const

Gets verbosity flag.

If true, the simplify action prints out messages at each stage of the simplification.

void SoSimplifyAction::setInlineLOD ( SbBool  i  ) 

Sets inlineLOD flag.

If true, each simplified child is written into a separate file using SoWWWInline nodes.

void SoSimplifyAction::setMinTriangles ( int  mt  ) 

Sets the minimum number of triangles for a simplified child; if a given percentage would create a simplified version that went below this minimum, no simplified chld is produced for this level.

void SoSimplifyAction::setRanges ( int  num,
const float  newRanges[] 
)

Sets the ranges that will be used in the LevelOfSimplification node to decide which level of detail to display.

This is optional; if not given, the size factor will be used to generate range values.

void SoSimplifyAction::setRenderCulling ( SbBool  r  ) 

Sets render culling flag.

If true, the "renderCulling" field will be set to ON for the Separators that hold each simplified level.

void SoSimplifyAction::setSimplificationLevels ( int  num,
const float  levels[] 
)

Sets number of levels of detail to produce and what percentage to produce at each level.

An example array would be [1.0, 0.3, 0.1], which would generate a LevelOfSimplification node with the original geometry and then two simplified children, one with 30% of the triangles and the other with 10% of the triangles in the original.

void SoSimplifyAction::setSizeFactor ( float  size  ) 

Sets the scale factor to use to decide what values of ranges to use in the LevelOfSimplification node.

void SoSimplifyAction::setUrlName ( const SbString  name  ) 

Sets the name used when creating Inline files for each simplified child.

void SoSimplifyAction::setVerbosity ( SbBool  v  ) 

Sets verbosity flag.

If true, the simplify action prints out messages at each stage of the simplification.


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

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