ProjectedTriangulationAlgorithm

This algorithm wraps a triangulationAlgorithm. Before triangulating the vertices a best fitting plane is estimated and the vertices are projected onto the plane in 2D. After performing the triangulation, the triangulation order is used to recreate the triangles in 3D.

Parameters

triangulationAlgorithm

actual triangulation algorithm applied after plane projection

Constructors

Link copied to clipboard
constructor(triangulationAlgorithm: TriangulationAlgorithm)

Functions

Link copied to clipboard
fun triangulateChecked(vertices: NonEmptyList<Vector3D>, tolerance: Double): Either<TriangulatorException, List<Polygon3D>>

Performs the triangulation operation and checks whether all input vertices are still represented after triangulation.