Manifold 3.0
Robust geometry
 
Loading...
Searching...
No Matches
Triangulation

Polygon triangulation. More...

Functions

std::vector< ivec3TriangulateIdx (const PolygonsIdx &polys, double epsilon)
 Triangulates a set of ε-valid polygons. If the input is not ε-valid, the triangulation may overlap, but will always return a manifold result that matches the input edge directions.
 
std::vector< ivec3Triangulate (const Polygons &polygons, double epsilon)
 Triangulates a set of ε-valid polygons. If the input is not ε-valid, the triangulation may overlap, but will always return a manifold result that matches the input edge directions.
 
ExecutionParamsPolygonParams ()
 

Detailed Description

Polygon triangulation.

Function Documentation

◆ TriangulateIdx()

std::vector< ivec3 > TriangulateIdx ( const PolygonsIdx & polys,
double epsilon )

Triangulates a set of ε-valid polygons. If the input is not ε-valid, the triangulation may overlap, but will always return a manifold result that matches the input edge directions.

Parameters
polysThe set of polygons, wound CCW and representing multiple polygons and/or holes. These have 2D-projected positions as well as references back to the original vertices.
epsilonThe value of ε, bounding the uncertainty of the input.
Returns
std::vector<ivec3> The triangles, referencing the original vertex indicies.

◆ Triangulate()

std::vector< ivec3 > Triangulate ( const Polygons & polygons,
double epsilon )

Triangulates a set of ε-valid polygons. If the input is not ε-valid, the triangulation may overlap, but will always return a manifold result that matches the input edge directions.

Parameters
polygonsThe set of polygons, wound CCW and representing multiple polygons and/or holes.
epsilonThe value of ε, bounding the uncertainty of the input.
Returns
std::vector<ivec3> The triangles, referencing the original polygon points in order.