Click or drag to resize

GeometryTriangulatePolygon Method

Triangulates the polygon specified by the points in polygon. Returns a Int32 where each triangle consists of three consecutive point indices into polygon (i.e. the returned array will have n * 3 elements, with n being the number of found triangles). If the triangulation did not succeed, an empty Int32 is returned.

Namespace:  Godot
Assembly:  GodotSharp (in GodotSharp.dll) Version: 1.0.0
Syntax
C#
public static int[] TriangulatePolygon(
	Vector2[] polygon
)

Parameters

polygon
Type: GodotVector2

[Missing <param name="polygon"/> documentation for "M:Godot.Geometry.TriangulatePolygon(Godot.Vector2[])"]

Return Value

Type: Int32

[Missing <returns> documentation for "M:Godot.Geometry.TriangulatePolygon(Godot.Vector2[])"]

See Also