Class Triangles
Methods for generating triangle index arrays for Mesh objects.
Inheritance
System.Object
Triangles
Namespace: VRSketchingGeometry.Meshing
Assembly: VRSketchingGeometry.dll
Syntax
public class Triangles
Remarks
Original author: tterpi
Methods
GenerateTrianglesClockwise(Int32, Int32)
Generate an indices array that defines a quadrilateral triangle topology. The order of the vertices of a triangle is clockwise when the vertices are ordered left to right, top to bottom.
Declaration
public static int[] GenerateTrianglesClockwise(int numOfVerticalVertices, int numOfHorizontalVertices)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Int32 | numOfVerticalVertices | |
| System.Int32 | numOfHorizontalVertices |
Returns
| Type | Description |
|---|---|
| System.Int32[] |
GenerateTrianglesCounterclockwise(Int32, Int32)
Generate an indices array that defines a quadrilateral triangle topology. The order of the vertices of a triangle is counter-clockwise when the vertices are ordered left to right, top to bottom.
Declaration
public static int[] GenerateTrianglesCounterclockwise(int numOfVerticalVertices, int numOfHorizontalVertices)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Int32 | numOfVerticalVertices | |
| System.Int32 | numOfHorizontalVertices |
Returns
| Type | Description |
|---|---|
| System.Int32[] |