Delaunay class

Delaunay triangulation of a set of points.

Uses the Bowyer-Watson algorithm to compute the Delaunay triangulation. Provides efficient methods for finding triangles, neighbors, and point location.

Constructors

Delaunay(Float64List coords)
Creates a Delaunay triangulation from flat coordinates x0, y0, x1, y1, ....
Delaunay.fromPoints(List<Point> points)
Creates a Delaunay triangulation from a list of points.
factory

Properties

coords Float64List
The input points flattened as x0, y0, x1, y1, ....
final
halfedges Int32List
Half-edge data structure for adjacency. halfedges[i] is the index of the opposite half-edge, or -1 if on hull.
latefinal
hashCode int
The hash code for this object.
no setterinherited
hull List<int>
The indices of the points on the convex hull, in counterclockwise order.
latefinal
pointsLength int
Number of input points.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
triangleIndices Int32List
Triangle indices: each group of 3 consecutive values forms a triangle. triangleIndices[i*3], triangleIndices[i*3+1], triangleIndices[i*3+2] are the indices of the vertices of triangle i.
latefinal
trianglesLength int
Number of triangles.
latefinal

Methods

circumcenter(int t) Point
Returns the circumcenter of triangle t.
circumcenters() List<Point>
Returns all circumcenters.
edges() Iterable<(int, int)>
Returns the edges of the triangulation as pairs of point indices.
find(double x, double y, [int startTriangle = 0]) int
Returns the triangle containing the given point, or -1 if not found. Uses walking algorithm starting from the given triangle (default: 0).
findPoint(Point p, [int startTriangle = 0]) int
Finds the triangle containing point p.
getPoint(int i) Point
Gets the point at index i.
getX(int i) double
Gets the x coordinate of point at index i.
getY(int i) double
Gets the y coordinate of point at index i.
hullPoints() List<Point>
Returns the convex hull points.
neighbors() Iterable<List<int>>
Returns the neighboring triangle indices for each triangle. Returns -1 for edges on the convex hull (no neighbor).
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
pointsAdjacentToPoint(int i) Set<int>
Returns the indices of points adjacent to point i.
toString() String
A string representation of this object.
inherited
triangleNeighbors(int t) List<int>
Returns the neighbor triangles for triangle t. Returns -1 for edges on the convex hull.
trianglePoints(int t) List<Point>
Returns the three points forming triangle t.
triangles() Iterable<List<int>>
Returns an iterable of all triangle indices. Each triangle is represented by 3 point indices.
trianglesAdjacentToPoint(int i) List<int>
Returns the indices of triangles adjacent to point i.
triangleVertices(int t) List<int>
Returns the three point indices for triangle t.

Operators

operator ==(Object other) bool
The equality operator.
inherited