public class Voronoi
extends java.lang.Object
implements java.io.Serializable
Modifier and Type | Class and Description |
---|---|
static class |
Voronoi.Edge |
static class |
Voronoi.Polygon |
static class |
Voronoi.Triangle |
Constructor and Description |
---|
Voronoi()
Constructs a triangulator instance but does not insert any points; you should add points to
getPointSet() before running triangulate() . |
Voronoi(OrderedSet<CoordDouble> pointSet)
Constructs a new triangulator instance using the specified point set.
|
Modifier and Type | Method and Description |
---|---|
OrderedSet<CoordDouble> |
getPointSet()
Returns the point set in form of a vector of 2D vectors.
|
java.util.ArrayList<Voronoi.Triangle> |
getTriangles()
Returns the triangles of the triangulation in form of a list of 2D
triangles.
|
java.util.ArrayList<Voronoi.Polygon> |
polygonize() |
void |
reorder(int[] permutation)
Shuffles the point set using a custom permutation sequence.
|
void |
shuffle(IRNG rng)
Creates a random permutation of the specified point set.
|
java.util.ArrayList<Voronoi.Triangle> |
triangulate()
This method generates a Delaunay triangulation from the specified point
set.
|
public Voronoi()
getPointSet()
before running triangulate()
.public Voronoi(OrderedSet<CoordDouble> pointSet)
pointSet
- The point set to be triangulatedpublic java.util.ArrayList<Voronoi.Triangle> triangulate()
public java.util.ArrayList<Voronoi.Polygon> polygonize()
public void shuffle(IRNG rng)
public void reorder(int[] permutation)
permutation
- The permutation used to shuffle the point setpublic OrderedSet<CoordDouble> getPointSet()
public java.util.ArrayList<Voronoi.Triangle> getTriangles()
Copyright © Eben Howard 2012–2022. All rights reserved.