Files
simple-makes-complex/docs/docs/modules/MapGen.Triangulation.md

1.1 KiB

global MapGen.Triangulation


methods


Triangulation.triangulate


function Triangulation.triangulate(vertices: table<integer,MapGen.Peak>) ->  ((MapGen.Triangle)|MapGen.Triangle[])

The Delaunay method divides a plane into triangles based on a list of their vertices.

Doesn't take into account the Y coordinate of the vertices. That is, all triangles that don't lie in the XZ plane will be projected onto it.

Vertices that do not have a is2d group will not participate in the triangulation.

Triangulation.tetrahedralize


function Triangulation.tetrahedralize(vertices: table<integer,MapGen.Peak>) ->  ((MapGen.Tetrahedron)|MapGen.Tetrahedron[])

The Delaunay method divides space into tetrahedra based on a list of their vertices.

Vertices that do not have a is3d group will not participate in the triangulation.

fields


Triangulation.convexMultiplier


Triangulation.convexMultiplier : number