 |
TriangulatorTriangulate(Vector2, ListVector2, ListInt32) Method |
Triangulate method triangulates the polygons with holes and returns positions and triangle indices that can be used to create a 3D mesh.
Shape with holes is represented by multiple arrays of positions that are defined by the polygons property.
The holes are identified by the orientation of positions (clockwise or anti-clockwise) that is different from the orientation of positions in the outer polygons.
The orientation of the outer polygons is defined by the orientation of the first polygon.
The method returns a list of triangulated positions (the outer polygons and holes are connected into a single polygon)
and a list of triangle indices that used to create a 3D mesh.
Namespace: Ab4d.SharpEngine.UtilitiesAssembly: Ab4d.SharpEngine (in Ab4d.SharpEngine.dll) Version: 3.1.9316+94bbd23b55747f096f056a5602f7dd90558b3673
Syntaxpublic static void Triangulate(
Vector2[][] polygons,
out List<Vector2> positions,
out List<int> triangleIndices
)
Parameters
- polygons Vector2
- array of polygon; each defined by a list of positions
- positions ListVector2
- list of triangulated positions (the outer polygons and holes are connected into a single polygon)
- triangleIndices ListInt32
- list of triangle indices that used to create a 3D mesh
Remarks[Missing <remarks> documentation for "M:Ab4d.SharpEngine.Utilities.Triangulator.Triangulate(System.Numerics.Vector2[][],System.Collections.Generic.List{System.Numerics.Vector2}@,System.Collections.Generic.List{System.Int32}@)"]
See Also