public class DelaunayTriangulator
extends java.lang.Object
Constructor and Description |
---|
DelaunayTriangulator(java.util.List<Vector2D> pointSet)
Constructor of the SimpleDelaunayTriangulator class used to create a new
triangulator instance.
|
Modifier and Type | Method and Description |
---|---|
java.util.List<Vector2D> |
getPointSet()
Returns the point set in form of a vector of 2D vectors.
|
java.util.List<Triangle2D> |
getTriangles()
Returns the trianges of the triangulation in form of a vector of 2D
triangles.
|
void |
shuffle()
Creates a random permutation of the specified point set.
|
void |
shuffle(int[] permutation)
Shuffles the point set using a custom permutation sequence.
|
void |
triangulate()
This method generates a Delaunay triangulation from the specified point
set.
|
public DelaunayTriangulator(java.util.List<Vector2D> pointSet)
pointSet
- The point set to be triangulatedpublic void triangulate() throws NotEnoughPointsException
NotEnoughPointsException
- Thrown when the point set contains less than three pointspublic void shuffle()
public void shuffle(int[] permutation)
permutation
- The permutation used to shuffle the point setpublic java.util.List<Vector2D> getPointSet()
public java.util.List<Triangle2D> getTriangles()