CreatePolygon

Mesh.CreatePolygon method (1 of 4)

Creates a new polygon with all vertices defined in indices. To create polygon vertex by vertex, please use PolygonBuilder.

public void CreatePolygon(int[] indices, int offset, int length)
Parameter Type Description
indices Int32[] Array of the polygon indices, each index points to a control point that forms the polygon.
offset Int32 The offset of the first polygon index
length Int32 The length of the indices

Examples

int[] indices = new int[] {0, 1, 2};
mesh.CreatePolygon(indices);

See Also


Mesh.CreatePolygon method (2 of 4)

Creates a new polygon with all vertices defined in indices. To create polygon vertex by vertex, please use PolygonBuilder.

public void CreatePolygon(int[] indices)
Parameter Type Description
indices Int32[] Array of the polygon indices, each index points to a control point that forms the polygon.

Examples

int[] indices = new int[] {0, 1, 2};
mesh.CreatePolygon(indices);

See Also


Mesh.CreatePolygon method (3 of 4)

Create a polygon with 4 vertices(quad)

public void CreatePolygon(int v1, int v2, int v3, int v4)
Parameter Type Description
v1 Int32 Index of the first vertex
v2 Int32 Index of the second vertex
v3 Int32 Index of the third vertex
v4 Int32 Index of the fourth vertex

See Also


Mesh.CreatePolygon method (4 of 4)

Create a polygon with 3 vertices(triangle)

public void CreatePolygon(int v1, int v2, int v3)
Parameter Type Description
v1 Int32 Index of the first vertex
v2 Int32 Index of the second vertex
v3 Int32 Index of the third vertex

See Also