AbstractVoronoiDiagram

Common surface for a Voronoi diagram generated from an AbstractDelaunayTriangulation's AbstractDelaunayTriangulation.points (the Voronoi sites), with cells clipped to bounds.

Inheritors

Properties

Link copied to clipboard
abstract val bounds: Rectangle

The rectangular region cells are clipped to.

Link copied to clipboard

The triangulation whose points are the Voronoi sites.

Functions

Link copied to clipboard
open fun cellArea(i: Int, contour: ShapeContour = cellPolygon(i)): Double

The (signed) area of cell i.

Link copied to clipboard
open fun cellCentroid(i: Int, contour: ShapeContour = cellPolygon(i)): Vector2

The centroid of cell i.

Link copied to clipboard
open fun cellCentroids(): List<Vector2>

The centroids of every cell, in point order.

Link copied to clipboard
abstract fun cellPolygon(i: Int): ShapeContour

The Voronoi cell polygon for site i (index into triangulation's points), clipped to bounds.

Link copied to clipboard
open fun cellPolygons(): List<ShapeContour>

The Voronoi cell polygons for every site, in point order.

Link copied to clipboard
abstract fun internalEdges(): Pair<List<Vector2>, List<IntArray>>

All edges of the diagram that neither lie on nor touch the boundary of the diagram.

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

Indices of the cells adjacent to cell cellIndex.