GitHub link
PMP
The Polygon Mesh Processing Library
SurfaceTriangulation Class Reference

Triangulate polygons to get a pure triangle mesh. More...

#include <pmp/algorithms/SurfaceTriangulation.h>

Public Types

enum class  Objective { MIN_AREA , MAX_ANGLE }
 Triangulation objective. More...
 

Public Member Functions

 SurfaceTriangulation (SurfaceMesh &mesh)
 Construct with mesh.
 
void triangulate (Objective o=Objective::MIN_AREA)
 Triangulate all faces.
 
void triangulate (Face f, Objective o=Objective::MIN_AREA)
 Triangulate the Face f. More...
 

Detailed Description

Triangulate n-gons into n-2 triangles. Finds the triangulation that minimizes the sum of squared triangle areas, or the one that maximizes the minimum angle. See [14] for details.

Member Enumeration Documentation

◆ Objective

enum Objective
strong
Enumerator
MIN_AREA 

minimize the sum of squared areas

MAX_ANGLE 

maximize the minimum angle

Member Function Documentation

◆ triangulate()

void triangulate ( Face  f,
Objective  o = Objective::MIN_AREA 
)
Precondition
The input face is manifold
Exceptions
InvalidInputExceptionin case the input precondition is violated