Class VertexSorter
Sort an array of points using quicksort.
Inheritance
System.Object
VertexSorter
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: UnityEngine.Experimental.U2D.TriangleNet.Tools
Syntax
public class VertexSorter
Methods
Alternate(Vertex[], Int32, Int32)
Impose alternating cuts on given vertex array.
Declaration
public static void Alternate(Vertex[] array, int length, int seed = 57113)
Parameters
Type | Name | Description |
---|---|---|
Vertex[] | array | The vertex array. |
System.Int32 | length | The number of vertices to sort. |
System.Int32 | seed | Random seed used for pivoting. |
Sort(Vertex[], Int32)
Sorts the given vertex array by x-coordinate.
Declaration
public static void Sort(Vertex[] array, int seed = 57113)
Parameters
Type | Name | Description |
---|---|---|
Vertex[] | array | The vertex array. |
System.Int32 | seed | Random seed used for pivoting. |