AbstractDelaunayTriangulation

Common surface shared by DelaunayTriangulation and ConstrainedDelaunayTriangulation: a set of vertex points and a triangulation of (some subset of) them.

Inheritors

Properties

Link copied to clipboard
abstract val points: List<Vector2>

The vertex positions referenced by triangleIndices.

Functions

Link copied to clipboard
open fun nearest(query: Vector2): Int

Index into points of the point nearest to query.

Link copied to clipboard
open fun nearestPoint(query: Vector2): Vector2

The point nearest to query.

Link copied to clipboard
open fun neighborPoints(pointIndex: Int): List<Vector2>

The positions of the nodes adjacent to pointIndex in the triangulation.

Link copied to clipboard
abstract fun neighbors(pointIndex: Int): Sequence<Int>

Indices into points of the nodes adjacent to pointIndex in the triangulation.

Link copied to clipboard
abstract fun triangleIndices(): List<IntArray>

The triangles as index triples into points, in counter-clockwise order.

Link copied to clipboard
abstract fun triangles(filterPredicate: (Int, Int, Int) -> Boolean = { _, _, _ -> true }): List<Triangle>

The triangles, optionally restricted to those whose vertex indices (in counter-clockwise order) satisfy filterPredicate.

Link copied to clipboard
abstract fun voronoiDiagram(bounds: Rectangle = points.bounds): AbstractVoronoiDiagram

The Voronoi diagram dual to this triangulation, with cells clipped to bounds.