Path Tracer
Public Attributes | List of all members
aiFace Struct Reference

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

#include <mesh.h>

Public Attributes

unsigned int mNumIndices
 
unsigned int * mIndices
 Pointer to the indices array. Size of the array is given in numIndices.
 

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' submeshes. 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

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.

Member Data Documentation

◆ 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:
aiPrimitiveType_POINT
@ aiPrimitiveType_POINT
Definition: mesh.h:377
aiPrimitiveType_LINE
@ aiPrimitiveType_LINE
Definition: mesh.h:384