Assimp v5.2.2 (January 2022)
The Asset-Importer-Lib API documentation.
mesh.h File Reference

Declares the data structures in which the imported geometry is returned by ASSIMP: aiMesh, aiFace and aiBone data structures. More...

Classes

struct  aiAnimMesh
 An AnimMesh is an attachment to an aiMesh stores per-vertex animations for a particular frame. More...
 
struct  aiBone
 A single bone of a mesh. More...
 
struct  aiFace
 A single face in a mesh, referring to multiple vertices. More...
 
struct  aiMesh
 enum aiMorphingMethod More...
 
struct  aiSkeleton
 
More...
 
struct  aiSkeletonBone
 
struct  aiVertexWeight
 A single influence of a bone on a vertex. More...
 

Macros

#define AI_MAX_BONE_WEIGHTS   0x7fffffff
 Maximum number of indices per face (polygon). More...
 
#define AI_MAX_FACE_INDICES   0x7fff
 Maximum number of indices per face (polygon). More...
 
#define AI_MAX_FACES   0x7fffffff
 Maximum number of faces per mesh. More...
 
#define AI_MAX_NUMBER_OF_COLOR_SETS   0x8
 Supported number of vertex color sets per mesh. More...
 
#define AI_MAX_NUMBER_OF_TEXTURECOORDS   0x8
 Supported number of texture coord sets (UV(W) channels) per mesh. More...
 
#define AI_MAX_VERTICES   0x7fffffff
 Maximum number of vertices per mesh. More...
 
#define AI_MESH_H_INC
 
#define AI_PRIMITIVE_TYPE_FOR_N_INDICES(n)    ((n) > 3 ? aiPrimitiveType_POLYGON : (aiPrimitiveType)(1u << ((n)-1)))
 enum aiPrimitiveType More...
 

Enumerations

enum  aiMorphingMethod { aiMorphingMethod_VERTEX_BLEND = 0x1 , aiMorphingMethod_MORPH_NORMALIZED = 0x2 , aiMorphingMethod_MORPH_RELATIVE = 0x3 , _aiMorphingMethod_Force32Bit = INT_MAX }
 Enumerates the methods of mesh morphing supported by Assimp. More...
 
enum  aiPrimitiveType {
  aiPrimitiveType_POINT = 0x1 , aiPrimitiveType_LINE = 0x2 , aiPrimitiveType_TRIANGLE = 0x4 , aiPrimitiveType_POLYGON = 0x8 ,
  aiPrimitiveType_NGONEncodingFlag = 0x10 , _aiPrimitiveType_Force32Bit = INT_MAX
}
 Enumerates the types of geometric primitives supported by Assimp. More...
 

Detailed Description

Declares the data structures in which the imported geometry is returned by ASSIMP: aiMesh, aiFace and aiBone data structures.

Macro Definition Documentation

◆ AI_MAX_BONE_WEIGHTS

#define AI_MAX_BONE_WEIGHTS   0x7fffffff

Maximum number of indices per face (polygon).

◆ AI_MAX_FACE_INDICES

#define AI_MAX_FACE_INDICES   0x7fff

Maximum number of indices per face (polygon).

◆ AI_MAX_FACES

#define AI_MAX_FACES   0x7fffffff

Maximum number of faces per mesh.

◆ AI_MAX_NUMBER_OF_COLOR_SETS

#define AI_MAX_NUMBER_OF_COLOR_SETS   0x8

Supported number of vertex color sets per mesh.

◆ AI_MAX_NUMBER_OF_TEXTURECOORDS

#define AI_MAX_NUMBER_OF_TEXTURECOORDS   0x8

Supported number of texture coord sets (UV(W) channels) per mesh.

◆ AI_MAX_VERTICES

#define AI_MAX_VERTICES   0x7fffffff

Maximum number of vertices per mesh.


◆ AI_MESH_H_INC

#define AI_MESH_H_INC

◆ AI_PRIMITIVE_TYPE_FOR_N_INDICES

#define AI_PRIMITIVE_TYPE_FOR_N_INDICES (   n)     ((n) > 3 ? aiPrimitiveType_POLYGON : (aiPrimitiveType)(1u << ((n)-1)))

enum aiPrimitiveType

Enumeration Type Documentation

◆ aiMorphingMethod

Enumerates the methods of mesh morphing supported by Assimp.

Enumerator
aiMorphingMethod_VERTEX_BLEND 

Interpolation between morph targets.

aiMorphingMethod_MORPH_NORMALIZED 

Normalized morphing between morph targets

aiMorphingMethod_MORPH_RELATIVE 

Relative morphing between morph targets

_aiMorphingMethod_Force32Bit 

This value is not used.

It is just here to force the compiler to map this enum to a 32 Bit integer.

◆ aiPrimitiveType

Enumerates the types of geometric primitives supported by Assimp.

See also
aiFace Face data structure
aiProcess_SortByPType Per-primitive sorting of meshes
aiProcess_Triangulate Automatic triangulation
AI_CONFIG_PP_SBP_REMOVE Removal of specific primitive types.
Enumerator
aiPrimitiveType_POINT 

A point primitive.

This is just a single vertex in the virtual world, aiFace contains just one index for such a primitive.

aiPrimitiveType_LINE 

A line primitive.

This is a line defined through a start and an end position. aiFace contains exactly two indices for such a primitive.

aiPrimitiveType_TRIANGLE 

A triangular primitive.

A triangle consists of three indices.

aiPrimitiveType_POLYGON 

A higher-level polygon with more than 3 edges.

A triangle is a polygon, but polygon in this context means "all polygons that are not triangles". The "Triangulate"-Step is provided for your convenience, it splits all polygons in triangles (which are much easier to handle).

aiPrimitiveType_NGONEncodingFlag 

A flag to determine whether this triangles only mesh is NGON encoded.

NGON encoding is a special encoding that tells whether 2 or more consecutive triangles should be considered as a triangle fan. This is identified by looking at the first vertex index. 2 consecutive triangles with the same 1st vertex index are part of the same NGON.

At the moment, only quads (concave or convex) are supported, meaning that polygons are 'seen' as triangles, as usual after a triangulation pass.

To get an NGON encoded mesh, please use the aiProcess_Triangulate post process.

See also
aiProcess_Triangulate https://github.com/KhronosGroup/glTF/pull/1620
_aiPrimitiveType_Force32Bit 

This value is not used.

It is just here to force the compiler to map this enum to a 32 Bit integer.