public class ThiessenPolygon extends Object
Constructor and Description |
---|
ThiessenPolygon(Vertex vertex,
List<IQuadEdge> edgeList,
boolean open)
Constructs a Thiessen Polygon representation.
|
Modifier and Type | Method and Description |
---|---|
double |
getArea()
Gets the area of the Voronoi polygon.
|
Rectangle2D |
getBounds()
Gets the bounds of the polygon
|
List<IQuadEdge> |
getEdges()
Gets the edges that comprise the polygon
|
int |
getIndex()
Gets the index element of the defining vertex for this polygon.
|
Vertex |
getVertex()
Gets the defining vertex of the polygon.
|
boolean |
isOpen()
Indicates that in a true Voronoi Diagram the polygon would
not form a closed polygon and would have an infinite domain.
|
boolean |
isPointInPolygon(double x,
double y)
Indicates whether the specified coordinate point lies inside or on an edge
of the polygon associated with this instance.
|
String |
toString() |
public ThiessenPolygon(Vertex vertex, List<IQuadEdge> edgeList, boolean open)
vertex
- The vertex at the center of the polygonedgeList
- a list of the edges comprising the polygonopen
- indicates whether the polygon is infinite (open) finite
(closed).public List<IQuadEdge> getEdges()
public double getArea()
public Vertex getVertex()
public Rectangle2D getBounds()
public boolean isPointInPolygon(double x, double y)
x
- the Cartesian x coordinate of the query pointy
- the Cartesian y coordinate of the query pointpublic boolean isOpen()
public int getIndex()
Copyright © 2021. All rights reserved.