public class BoundedVoronoiDiagram extends Object
This class is under development and is subject to minor changes in its API and behavior.
Constructor and Description |
---|
BoundedVoronoiDiagram(IIncrementalTin delaunayTriangulation)
Constructs an instance of a Voronoi Diagram that corresponds to the input
Delaunay Triangulation.
|
BoundedVoronoiDiagram(List<Vertex> vertexList,
BoundedVoronoiBuildOptions options)
Construct a Voronoi Diagram structure based on the input vertex set.
|
Modifier and Type | Method and Description |
---|---|
Rectangle2D |
getBounds()
Gets the bounds of the bounded Voronoi Diagram.
|
ThiessenPolygon |
getContainingPolygon(double x,
double y)
Gets the polygon that contains the specified coordinate point (x,y).
|
List<IQuadEdge> |
getEdges()
Gets a list of the edges in the Voronoi Diagram.
|
int |
getMaximumEdgeAllocationIndex()
Gets the maximum index of the currently allocated edges.
|
List<ThiessenPolygon> |
getPolygons()
Gets a list of the polygons that comprise the Voronoi Diagram
|
Rectangle2D |
getSampleBounds()
Gets the bounds of the sample data set.
|
List<Vertex> |
getVertices()
Gets a list of the vertices that define the Voronoi Diagram.
|
List<Vertex> |
getVoronoiVertices()
Gets the vertices that were created to produce the Voronoi Diagram.
|
void |
printDiagnostics(PrintStream ps)
Prints diagnostic statistics for the Voronoi Diagram object.
|
public BoundedVoronoiDiagram(List<Vertex> vertexList, BoundedVoronoiBuildOptions options)
vertexList
- a valid list of verticesoptions
- optional specification for setting build parameters or a
null to use defaults.public BoundedVoronoiDiagram(IIncrementalTin delaunayTriangulation)
delaunayTriangulation
- a valid instance of a Delaunay Triangulation
implementation.public void printDiagnostics(PrintStream ps)
ps
- a valid print stream instance.public Rectangle2D getBounds()
public Rectangle2D getSampleBounds()
public List<IQuadEdge> getEdges()
public List<Vertex> getVertices()
public List<Vertex> getVoronoiVertices()
public List<ThiessenPolygon> getPolygons()
public ThiessenPolygon getContainingPolygon(double x, double y)
Note: Although a true Voronoi Diagram covers the entire plane, the Bounded Voronoi class is has a finite domain. If the specified coordinates are outside the bounds of this instance, no polygon will be found and a null result will be returned.
x
- a valid floating point valuey
- a valid floating point valuepublic int getMaximumEdgeAllocationIndex()
Internally, Tinfour uses edge index values to manage edges in memory. The while there can be small gaps in the indexing sequence, this method provides a way of obtaining the absolute maximum value of currently allocated edges.
Copyright © 2021. All rights reserved.