Show / Hide Table of Contents

Class Delaunator

Inheritance
System.Object
Delaunator
Namespace: Sylves
Assembly: Sylves.dll
Syntax
public class Delaunator : Object

Constructors

Delaunator(IList<Vector2>)

Declaration
public Delaunator(IList<Vector2> points)
Parameters
Type Name Description
System.Collections.Generic.IList<Vector2> points

Properties

Halfedges

One value per half-edge, containing the opposite half-edge in the adjacent triangle, or -1 if there is no adjacent triangle

Declaration
public int[] Halfedges { get; }
Property Value
Type Description
System.Int32[]

Hull

A list of point indices that traverses the hull of the points.

Declaration
public int[] Hull { get; }
Property Value
Type Description
System.Int32[]

Points

The initial points Delaunator was constructed with.

Declaration
public IList<Vector2> Points { get; }
Property Value
Type Description
System.Collections.Generic.IList<Vector2>

Triangles

One value per half-edge, containing the point index of where a given half edge starts. Half-edges are stored in triplets for each triangle in the triangulation, so this is essentially the three points of reach triangle, in order.

Declaration
public int[] Triangles { get; }
Property Value
Type Description
System.Int32[]

Methods

EdgeIndexToTriangleIndex(Int32)

Declaration
public static int EdgeIndexToTriangleIndex(int e)
Parameters
Type Name Description
System.Int32 e
Returns
Type Description
System.Int32

EdgeIndicesAroundTriangle(Int32)

Declaration
public static Triple<int> EdgeIndicesAroundTriangle(int t)
Parameters
Type Name Description
System.Int32 t
Returns
Type Description
Triple<System.Int32>

EdgesAroundTriangle(Int32)

Declaration
public Triple<(Vector2, Vector2)> EdgesAroundTriangle(int t)
Parameters
Type Name Description
System.Int32 t
Returns
Type Description
Triple<System.ValueTuple<Vector2, Vector2>>

GetCentroid(Vector2, Vector2, Vector2)

Declaration
public static Vector2 GetCentroid(Vector2 a, Vector2 b, Vector2 c)
Parameters
Type Name Description
Vector2 a
Vector2 b
Vector2 c
Returns
Type Description
Vector2

GetCentroid(Int32)

Declaration
public Vector2 GetCentroid(int t)
Parameters
Type Name Description
System.Int32 t
Returns
Type Description
Vector2

GetCircumcenter(Vector2, Vector2, Vector2)

Declaration
public static Vector2 GetCircumcenter(Vector2 a, Vector2 b, Vector2 c)
Parameters
Type Name Description
Vector2 a
Vector2 b
Vector2 c
Returns
Type Description
Vector2

GetEdge(Int32)

Returns the pair of points for an edge by a given halfedge index.

Declaration
public (Vector2, Vector2) GetEdge(int e)
Parameters
Type Name Description
System.Int32 e
Returns
Type Description
System.ValueTuple<Vector2, Vector2>

GetEdges()

Returns all edges in the triangulation. Each edge is only represented once, even if there is a triangle on either side.

Declaration
public IEnumerable<(Vector2, Vector2)> GetEdges()
Returns
Type Description
System.Collections.Generic.IEnumerable<System.ValueTuple<Vector2, Vector2>>

GetHullEdges()

Declaration
public IEnumerable<(Vector2, Vector2)> GetHullEdges()
Returns
Type Description
System.Collections.Generic.IEnumerable<System.ValueTuple<Vector2, Vector2>>

GetHullPoints()

Declaration
public IEnumerable<Vector2> GetHullPoints()
Returns
Type Description
System.Collections.Generic.IEnumerable<Vector2>

GetTriangle(Int32)

Gets a triangle with the three points around of a given trianle index.

Declaration
public DelaunayTriangle GetTriangle(int t)
Parameters
Type Name Description
System.Int32 t
Returns
Type Description
DelaunayTriangle

GetTriangleCircumcenter(Int32)

Declaration
public Vector2 GetTriangleCircumcenter(int t)
Parameters
Type Name Description
System.Int32 t
Returns
Type Description
Vector2

GetTriangles()

Returns the points of all triangles in the Delauney triangulation

Declaration
public IEnumerable<DelaunayTriangle> GetTriangles()
Returns
Type Description
System.Collections.Generic.IEnumerable<DelaunayTriangle>

NextHalfedge(Int32)

Declaration
public static int NextHalfedge(int e)
Parameters
Type Name Description
System.Int32 e
Returns
Type Description
System.Int32

PointIndiciesAroundTriangle(Int32)

Declaration
public Triple<int> PointIndiciesAroundTriangle(int t)
Parameters
Type Name Description
System.Int32 t
Returns
Type Description
Triple<System.Int32>

PointsAroundTriangle(Int32)

Declaration
public Triple<Vector2> PointsAroundTriangle(int t)
Parameters
Type Name Description
System.Int32 t
Returns
Type Description
Triple<Vector2>

PreviousHalfedge(Int32)

Declaration
public static int PreviousHalfedge(int e)
Parameters
Type Name Description
System.Int32 e
Returns
Type Description
System.Int32

TrianglesAdjacentToTriangle(Int32)

Declaration
public IEnumerable<int> TrianglesAdjacentToTriangle(int t)
Parameters
Type Name Description
System.Int32 t
Returns
Type Description
System.Collections.Generic.IEnumerable<System.Int32>
In This Article
Back to top Generated by DocFX