Assimp v5.2.2 (January 2022)
The Asset-Importer-Lib API documentation.
Assimp::Subdivider Class Referenceabstract

Helper class to evaluate subdivision surfaces. More...

#include <Subdivision.h>

Public Types

enum  Algorithm { CATMULL_CLARKE = 0x1 }
 Enumerates all supported subvidision algorithms. More...
 

Public Member Functions

virtual void Subdivide (aiMesh **smesh, size_t nmesh, aiMesh **out, unsigned int num, bool discard_input=false)=0
 Subdivide multiple meshes using the selected algorithm. More...
 
virtual void Subdivide (aiMesh *mesh, aiMesh *&out, unsigned int num, bool discard_input=false)=0
 Subdivide a mesh using the selected algorithm. More...
 
virtual ~Subdivider ()
 

Static Public Member Functions

static SubdividerCreate (Algorithm algo)
 Create a subdivider of a specific type. More...
 

Detailed Description

Helper class to evaluate subdivision surfaces.

Different algorithms are provided for choice.

Member Enumeration Documentation

◆ Algorithm

Enumerates all supported subvidision algorithms.

Enumerator
CATMULL_CLARKE 

Constructor & Destructor Documentation

◆ ~Subdivider()

Assimp::Subdivider::~Subdivider ( )
inlinevirtualdefault

Member Function Documentation

◆ Create()

static Subdivider * Assimp::Subdivider::Create ( Algorithm  algo)
static

Create a subdivider of a specific type.

Parameters
algoAlgorithm to be used for subdivision
Returns
Subdivider instance.

◆ Subdivide() [1/2]

virtual void Assimp::Subdivider::Subdivide ( aiMesh **  smesh,
size_t  nmesh,
aiMesh **  out,
unsigned int  num,
bool  discard_input = false 
)
pure virtual

Subdivide multiple meshes using the selected algorithm.

This avoids erroneous smoothing on objects consisting of multiple per-material meshes. Usually, most 3d modellers smooth on a per-object base, regardless the materials assigned to the meshes.

Parameters
smeshArray of meshes to be subdivided. Must be in verbose format.
nmeshNumber of meshes in smesh.
outReceives the output meshes. The array must be sufficiently large (at least nmesh elements) and may not overlap the input array. Output meshes map one-to-one to their corresponding input meshes. The meshes are allocated by the function.
discard_inputIf true is passed, input meshes are deleted after the subdivision is complete. This can improve performance because it allows the optimization of reusing existing meshes for intermediate results.
numNumber of subdivisions to perform.
Precondition
nmesh != 0, smesh and out may not overlap

◆ Subdivide() [2/2]

virtual void Assimp::Subdivider::Subdivide ( aiMesh mesh,
aiMesh *&  out,
unsigned int  num,
bool  discard_input = false 
)
pure virtual

Subdivide a mesh using the selected algorithm.

Parameters
meshFirst mesh to be subdivided. Must be in verbose format.
outReceives the output mesh, allocated by me.
numNumber of subdivisions to perform.
discard_inputIf true is passed, the input mesh is deleted after the subdivision is complete. This can improve performance because it allows the optimization to reuse the existing mesh for intermediate results.
Precondition
out!=mesh

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