Open Inventor Release 2024.1.3
 
Loading...
Searching...
No Matches
SoSimplifier Class Referenceabstract

VSG extension Abstract base class for objects that encapsulate simplification algorithms. More...

#include <Inventor/simplifier/SoSimplifier.h>

+ Inheritance diagram for SoSimplifier:

Public Types

enum  ShapeType {
  TRIANGLES ,
  TRIANGLE_STRIP ,
  TRIANGLE_FAN
}
 ShapeType. More...
 

Public Member Functions

 SoSimplifier ()
 Constructor.
 
virtual ~SoSimplifier ()
 Destructor.
 
virtual void beginShape (ShapeType)
 Starts a new shape, ShapeType defines which triangle organization to use.
 
virtual void endShape ()
 Ends a shape started by beginShape().
 
virtual void setVertex (const SbVec3f &)
 Specifies a new vertex location.
 
void setNormal (const SbVec3f &)
 Method to set optional vertex data (normal).
 
void setData (int numData, const float *)
 Method to set optional vertex data (data).
 
void setColor (const unsigned long &)
 Method to set optional vertex data (color).
 
virtual SoNodesimplify (float)=0
 Performs the simplification on the shapes and returns a simplified node.
 
virtual void clear ()
 Removes all shapes and reset.
 
virtual int getNumTriangles ()
 Returns the number of triangles actually stored in the object.
 
virtual void setVerbosity (SbBool v)
 Sets whether to print messages while simplifying.
 
SbBool getVerbosity () const
 Gets whether to print messages while simplifying.
 

Detailed Description

VSG extension Abstract base class for objects that encapsulate simplification algorithms.

This class abstract base class for objects that encapsulates simplification algorithms. This object receives a set of triangles and returns a new list representing a simplified version of the original geometry.

SEE ALSO

SoDecimator, SoSimplifyAction, SoShapeSimplifyAction, SoGlobalSimplifyAction

Definition at line 51 of file SoSimplifier.h.

Member Enumeration Documentation

◆ ShapeType

ShapeType.

Enumerator
TRIANGLES 

TRIANGLES.

TRIANGLE_STRIP 

TRIANGLE_STRIP.

TRIANGLE_FAN 

TRIANGLE_FAN.

Definition at line 66 of file SoSimplifier.h.

Constructor & Destructor Documentation

◆ SoSimplifier()

SoSimplifier::SoSimplifier ( )
inline

Constructor.

Definition at line 57 of file SoSimplifier.h.

◆ ~SoSimplifier()

virtual SoSimplifier::~SoSimplifier ( )
virtual

Destructor.

Member Function Documentation

◆ beginShape()

virtual void SoSimplifier::beginShape ( ShapeType  )
virtual

Starts a new shape, ShapeType defines which triangle organization to use.

ShapeType can be one of TRIANGLES, TRIANGLE_STRIP, TRIANGLE_FAN.

Reimplemented in SoDecimator.

◆ clear()

virtual void SoSimplifier::clear ( )
virtual

Removes all shapes and reset.

Reimplemented in SoDecimator.

◆ endShape()

virtual void SoSimplifier::endShape ( )
virtual

Ends a shape started by beginShape().

Reimplemented in SoDecimator.

◆ getNumTriangles()

virtual int SoSimplifier::getNumTriangles ( )
inlinevirtual

Returns the number of triangles actually stored in the object.

If called after simplify(), returns the remaining triangles.

Definition at line 119 of file SoSimplifier.h.

◆ getVerbosity()

SbBool SoSimplifier::getVerbosity ( ) const
inline

Gets whether to print messages while simplifying.

Definition at line 128 of file SoSimplifier.h.

◆ setColor()

void SoSimplifier::setColor ( const unsigned long &  )

Method to set optional vertex data (color).

Must be called before setVertex()

◆ setData()

void SoSimplifier::setData ( int  numData,
const float *   
)

Method to set optional vertex data (data).

Must be called before setVertex().

◆ setNormal()

void SoSimplifier::setNormal ( const SbVec3f )

Method to set optional vertex data (normal).

Must be called before setVertex().

◆ setVerbosity()

virtual void SoSimplifier::setVerbosity ( SbBool  v)
inlinevirtual

Sets whether to print messages while simplifying.

Reimplemented in SoDecimator.

Definition at line 124 of file SoSimplifier.h.

◆ setVertex()

virtual void SoSimplifier::setVertex ( const SbVec3f )
virtual

Specifies a new vertex location.

Reimplemented in SoDecimator.

◆ simplify()

virtual SoNode * SoSimplifier::simplify ( float  )
pure virtual

Performs the simplification on the shapes and returns a simplified node.

On this class, this function is pure virtual; derived classes must implement this function.

Implemented in SoDecimator.


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