Assimp
v4.1. (December 2018)
|
Subdivider stub class to implement the Catmull-Clarke subdivision algorithm. More...
Inherits Assimp::Subdivider.
Classes | |
struct | Edge |
Intermediate description of an edge between two corners of a polygon. More... | |
Public Types | |
typedef std::map< uint64_t, Edge > | EdgeMap |
typedef std::vector< unsigned int > | UIntVector |
![]() | |
enum | Algorithm { CATMULL_CLARKE = 0x1 } |
Enumerates all supported subvidision algorithms. More... | |
Public Member Functions | |
void | Subdivide (aiMesh *mesh, aiMesh *&out, unsigned int num, bool discard_input) |
Subdivide a mesh using the selected algorithm. More... | |
void | Subdivide (aiMesh **smesh, size_t nmesh, aiMesh **out, unsigned int num, bool discard_input) |
Subdivide multiple meshes using the selected algorithm. More... | |
![]() | |
virtual | ~Subdivider () |
Additional Inherited Members | |
![]() | |
static Subdivider * | Create (Algorithm algo) |
Create a subdivider of a specific type. More... | |
Subdivider stub class to implement the Catmull-Clarke subdivision algorithm.
The implementation is basing on recursive refinement. Directly evaluating the result is also possible and much quicker, but it depends on lengthy matrix lookup tables.
typedef std::map<uint64_t,Edge> CatmullClarkSubdivider::EdgeMap |
typedef std::vector<unsigned int> CatmullClarkSubdivider::UIntVector |
|
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. |
Implements Assimp::Subdivider.
|
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. |
Implements Assimp::Subdivider.