Helper class to evaluate subdivision surfaces.
More...
Inherited by CatmullClarkSubdivider.
Helper class to evaluate subdivision surfaces.
Different algorithms are provided for choice.
◆ Algorithm
Enumerates all supported subvidision algorithms.
◆ ~Subdivider()
Assimp::Subdivider::~Subdivider |
( |
| ) |
|
|
inlinevirtual |
◆ Create()
Create a subdivider of a specific type.
- Parameters
-
algo | Algorithm to be used for subdivision |
- Returns
- Subdivider instance.
◆ Subdivide() [1/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
-
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. |
- Precondition
- out!=mesh
Implemented in CatmullClarkSubdivider.
◆ Subdivide() [2/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
-
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. |
- Precondition
- nmesh != 0, smesh and out may not overlap
Implemented in CatmullClarkSubdivider.
The documentation for this class was generated from the following files: