DelaunayTriangulation

Kotlin/OPENRNDR idiomatic interface to Delaunay

Constructors

Link copied to clipboard
constructor(points: List<Vector2>)

Properties

Link copied to clipboard
Link copied to clipboard
open override val points: List<Vector2>

The vertex positions referenced by triangleIndices.

Functions

Link copied to clipboard
fun halfedges(): List<ShapeContour>
Link copied to clipboard
fun hull(): ShapeContour
Link copied to clipboard
open override 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
open override fun neighbors(pointIndex: Int): Sequence<Int>

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

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

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

Link copied to clipboard
open override 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
open override fun voronoiDiagram(bounds: Rectangle = points.bounds): VoronoiDiagram

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