public final class VoronoiEdge
extends java.lang.Object
Voronoi algorithm.
Immutable class holding one element in the VoronoiResults.voronoiEdges
collection of the VoronoiResults class. Contains the indices of the two
VoronoiResults.voronoiVertices that terminate the edge, as well as the indices
of the two VoronoiResults.generatorSites that are bisected by the edge.
This allows constructing the Voronoi region corresponding to each generator site.| Modifier and Type | Field and Description |
|---|---|
int |
site1
The index of the first of the two
VoronoiResults.generatorSites
that are bisected by the VoronoiEdge. |
int |
site2
The index of the second of the two
VoronoiResults.generatorSites
that are bisected by the VoronoiEdge. |
int |
vertex1
The index of the first of the two
VoronoiResults.voronoiVertices
that are connected by the VoronoiEdge. |
int |
vertex2
The index of the second of the two
VoronoiResults.voronoiVertices
that are connected by the VoronoiEdge. |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object obj)
Compares the specified
Object to this VoronoiEdge instance. |
int |
hashCode()
Returns a hash code for the
VoronoiEdge. |
java.lang.String |
toString()
Returns a
String representation of the VoronoiEdge. |
public final int site1
VoronoiResults.generatorSites
that are bisected by the VoronoiEdge.public final int site2
VoronoiResults.generatorSites
that are bisected by the VoronoiEdge.public final int vertex1
VoronoiResults.voronoiVertices
that are connected by the VoronoiEdge.public final int vertex2
VoronoiResults.voronoiVertices
that are connected by the VoronoiEdge.public boolean equals(java.lang.Object obj)
Object to this VoronoiEdge instance.equals in class java.lang.Objectobj - the Object to compare to this instancetrue if obj is not null and a VoronoiEdge instance
whose site1, site2, vertex1, and vertex2 values
equal those of this instance, else falsepublic int hashCode()
VoronoiEdge.hashCode in class java.lang.ObjectInteger hash code for the VoronoiEdgepublic java.lang.String toString()
String representation of the VoronoiEdge.