Assimp v5.2.2 (January 2022)
The Asset-Importer-Lib API documentation.
aiFace Struct Reference

A single face in a mesh, referring to multiple vertices. More...

#include <mesh.h>

Public Member Functions

 aiFace () AI_NO_EXCEPT
 Default constructor.
 
 aiFace (const aiFace &o)
 Copy constructor. Copy the index array.
 
bool operator!= (const aiFace &o) const
 Inverse comparison operator.
 
aiFaceoperator= (const aiFace &o)
 Assignment operator. Copy the index array.
 
bool operator== (const aiFace &o) const
 Comparison operator. Checks whether the index array of two faces is identical.
 
 ~aiFace ()
 Default destructor. Delete the index array.
 

Public Attributes

unsigned intmIndices
 Pointer to the indices array. Size of the array is given in numIndices.
 
unsigned int mNumIndices
 Number of indices defining this face.
 

Detailed Description

A single face in a mesh, referring to multiple vertices.

If mNumIndices is 3, we call the face 'triangle', for mNumIndices > 3 it's called 'polygon' (hey, that's just a definition!).
aiMesh::mPrimitiveTypes can be queried to quickly examine which types of primitive are actually present in a mesh. The aiProcess_SortByPType flag executes a special post-processing algorithm which splits meshes with different primitive types mixed up (e.g. lines and triangles) in several 'clean' sub-meshes. Furthermore there is a configuration option ( #AI_CONFIG_PP_SBP_REMOVE) to force aiProcess_SortByPType to remove specific kinds of primitives from the imported scene, completely and forever. In many cases you'll probably want to set this setting to

@ aiPrimitiveType_LINE
A line primitive.
Definition mesh.h:412
@ aiPrimitiveType_POINT
A point primitive.
Definition mesh.h:404

Together with the aiProcess_Triangulate flag you can then be sure that aiFace::mNumIndices is always 3.

Note
Take a look at the Data Structures page for more information on the layout and winding order of a face.

Constructor & Destructor Documentation

◆ aiFace() [1/2]

aiFace::aiFace ( )
inline

Default constructor.

◆ ~aiFace()

aiFace::~aiFace ( )
inline

Default destructor. Delete the index array.

◆ aiFace() [2/2]

aiFace::aiFace ( const aiFace o)
inline

Copy constructor. Copy the index array.

Member Function Documentation

◆ operator!=()

bool aiFace::operator!= ( const aiFace o) const
inline

Inverse comparison operator.

Checks whether the index array of two faces is NOT identical

◆ operator=()

aiFace & aiFace::operator= ( const aiFace o)
inline

Assignment operator. Copy the index array.

◆ operator==()

bool aiFace::operator== ( const aiFace o) const
inline

Comparison operator. Checks whether the index array of two faces is identical.

Member Data Documentation

◆ mIndices

unsigned int* aiFace::mIndices

Pointer to the indices array. Size of the array is given in numIndices.

◆ mNumIndices

unsigned int aiFace::mNumIndices

Number of indices defining this face.

The maximum value for this member is AI_MAX_FACE_INDICES.


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