public abstract class BaseVoronoiVertex extends java.lang.Object implements java.lang.Comparable<BaseVoronoiVertex>
Modifier and Type | Field and Description |
---|---|
protected double |
Distance
Distance from cell center
|
protected org.apache.commons.math3.geometry.euclidean.threed.Vector3D |
Position
Position of vertex
|
Modifier | Constructor and Description |
---|---|
protected |
BaseVoronoiVertex(Atom insideAtom,
org.apache.commons.math3.geometry.euclidean.threed.Vector3D position)
Initialize a Voronoi vertex.
|
Modifier and Type | Method and Description |
---|---|
abstract int |
compareTo(BaseVoronoiVertex other) |
double |
distanceFrom(BaseVoronoiVertex vertex)
Compute distance between vertices
|
protected static org.apache.commons.math3.geometry.euclidean.threed.Vector3D |
getCentroid(java.util.Collection<BaseVoronoiVertex> points)
Compute the centroid of a group of vertices
|
double |
getDistanceFromCenter()
Get the distance from the center of the cell.
|
org.apache.commons.math3.geometry.euclidean.threed.Vector3D |
getPosition()
Get the Position of this vertex
|
int |
hashCode() |
java.lang.String |
toString() |
protected final org.apache.commons.math3.geometry.euclidean.threed.Vector3D Position
protected final double Distance
protected BaseVoronoiVertex(Atom insideAtom, org.apache.commons.math3.geometry.euclidean.threed.Vector3D position)
Developer note: This class does not check if position is null. This might occur depending on the input to a constructor of a subclass VoronoiVertex
insideAtom
- Atom on inside of cellposition
- Position of vertexprotected static org.apache.commons.math3.geometry.euclidean.threed.Vector3D getCentroid(java.util.Collection<BaseVoronoiVertex> points)
points
- Pointspublic double distanceFrom(BaseVoronoiVertex vertex)
vertex
- Other vertexpublic double getDistanceFromCenter()
public org.apache.commons.math3.geometry.euclidean.threed.Vector3D getPosition()
public java.lang.String toString()
toString
in class java.lang.Object
public abstract int compareTo(BaseVoronoiVertex other)
compareTo
in interface java.lang.Comparable<BaseVoronoiVertex>
public int hashCode()
hashCode
in class java.lang.Object