Assimp  v4.1. (December 2018)
TriangulateProcess.cpp File Reference

Implementation of the post processing step to split up all faces with more than three indices into triangles. More...

Macros

#define POLY_GRID_X   70
 
#define POLY_GRID_XPAD   20
 
#define POLY_GRID_Y   40
 
#define POLY_OUTPUT_FILE   "assimp_polygons_debug.txt"
 

Detailed Description

Implementation of the post processing step to split up all faces with more than three indices into triangles.

The triangulation algorithm will handle concave or convex polygons. Self-intersecting or non-planar polygons are not rejected, but they're probably not triangulated correctly.

DEBUG SWITCHES - do not enable any of them in release builds:

AI_BUILD_TRIANGULATE_COLOR_FACE_WINDING

  • generates vertex colors to represent the face winding order. the first vertex of a polygon becomes red, the last blue. AI_BUILD_TRIANGULATE_DEBUG_POLYS
  • dump all polygons and their triangulation sequences to a file

Macro Definition Documentation

◆ POLY_GRID_X

#define POLY_GRID_X   70

◆ POLY_GRID_XPAD

#define POLY_GRID_XPAD   20

◆ POLY_GRID_Y

#define POLY_GRID_Y   40

◆ POLY_OUTPUT_FILE

#define POLY_OUTPUT_FILE   "assimp_polygons_debug.txt"