Show / Hide Table of Contents

Class Delaunator

Inheritance
object
Delaunator
Inherited Members
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
Namespace: Sylves
Assembly: Sylves.dll
Syntax
public class Delaunator

Constructors

Delaunator(IList<Vector2>)

Declaration
public Delaunator(IList<Vector2> points)
Parameters
Type Name Description
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
int[]

Hull

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

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

Points

The initial points Delaunator was constructed with.

Declaration
public IList<Vector2> Points { get; }
Property Value
Type Description
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
int[]

Methods

EdgeIndexToTriangleIndex(int)

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

EdgeIndicesAroundTriangle(int)

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

EdgesAroundTriangle(int)

Declaration
public Triple<(Vector2, Vector2)> EdgesAroundTriangle(int t)
Parameters
Type Name Description
int t
Returns
Type Description
Triple<(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(int)

Declaration
public Vector2 GetCentroid(int t)
Parameters
Type Name Description
int 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(int)

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

Declaration
public (Vector2, Vector2) GetEdge(int e)
Parameters
Type Name Description
int e
Returns
Type Description
(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
IEnumerable<(Vector2, Vector2)>

GetHullEdges()

Declaration
public IEnumerable<(Vector2, Vector2)> GetHullEdges()
Returns
Type Description
IEnumerable<(Vector2, Vector2)>

GetHullPoints()

Declaration
public IEnumerable<Vector2> GetHullPoints()
Returns
Type Description
IEnumerable<Vector2>

GetTriangle(int)

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

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

GetTriangleCircumcenter(int)

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

GetTriangles()

Returns the points of all triangles in the Delauney triangulation

Declaration
public IEnumerable<DelaunayTriangle> GetTriangles()
Returns
Type Description
IEnumerable<DelaunayTriangle>

NextHalfedge(int)

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

PointIndiciesAroundTriangle(int)

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

PointsAroundTriangle(int)

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

PreviousHalfedge(int)

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

TrianglesAdjacentToTriangle(int)

Declaration
public IEnumerable<int> TrianglesAdjacentToTriangle(int t)
Parameters
Type Name Description
int t
Returns
Type Description
IEnumerable<int>
In this article
Back to top Generated by DocFX