Assimp v5.2.2 (January 2022)
The Asset-Importer-Lib API documentation.
|
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 Subdivider * | Create (Algorithm algo) |
Create a subdivider of a specific type. More... | |
Helper class to evaluate subdivision surfaces.
Different algorithms are provided for choice.
|
inlinevirtualdefault |
|
static |
Create a subdivider of a specific type.
algo | Algorithm to be used for subdivision |
|
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.
smesh | Array of meshes to be subdivided. Must be in verbose format. |
nmesh | Number of meshes in smesh. |
out | Receives 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_input | If 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. |
num | Number of subdivisions to perform. |
|
pure virtual |
Subdivide a mesh using the selected algorithm.
mesh | First mesh to be subdivided. Must be in verbose format. |
out | Receives the output mesh, allocated by me. |
num | Number of subdivisions to perform. |
discard_input | If 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. |