public abstract class BaseVoronoiEdge extends java.lang.Object implements java.lang.Comparable<BaseVoronoiEdge>
Modifier and Type | Field and Description |
---|---|
protected double |
Beginning
Point marking the beginning of this edge
|
protected org.apache.commons.math3.geometry.euclidean.threed.Vector3D |
Direction
Direction of edge
|
protected BaseVoronoiFace |
EdgeFace
EdgeFace on which this edge exists
|
protected double |
End
Point marking the end of this edge
|
protected BaseVoronoiFace |
IntersectingFace
EdgeFace that intersected
EdgeFace to form this edge |
protected org.apache.commons.math3.geometry.euclidean.threed.Line |
Line
Line representing this edge
|
protected BaseVoronoiEdge |
NextEdge
Edge after this edge
|
protected BaseVoronoiEdge |
PreviousEdge
Edge before this edge
|
Modifier | Constructor and Description |
---|---|
protected |
BaseVoronoiEdge() |
protected |
BaseVoronoiEdge(BaseVoronoiFace face,
BaseVoronoiFace intersectingFace)
Initialize a edge by defining the face on which the edge exists, and
the
|
Modifier and Type | Method and Description |
---|---|
int |
compareTo(BaseVoronoiEdge o) |
static boolean |
computeIntersection(BaseVoronoiEdge edge1,
BaseVoronoiEdge edge2)
Computes the intersection between two vectors.
|
boolean |
equals(java.lang.Object obj) |
abstract BaseVoronoiEdge |
generatePair()
Generate the edge that corresponds to this edge on the intersecting face.
|
BaseVoronoiFace |
getEdgeFace()
Get the face containing this edge
|
abstract BaseVoronoiVertex |
getEndVertex()
Get the vertex at the end of this vector
|
BaseVoronoiFace |
getIntersectingFace()
Get the other face associated with this edge
|
double |
getLength()
Get the length of this edge
|
org.apache.commons.math3.geometry.euclidean.threed.Line |
getLine()
Get the line defining this edge
|
BaseVoronoiEdge |
getNextEdge()
Get the next edge on this face
|
BaseVoronoiEdge |
getPreviousEdge()
Get the next edge on this face
|
abstract BaseVoronoiVertex |
getStartVertex()
Get the vertex at the beginning of this vector
|
int |
hashCode() |
boolean |
isCCW(BaseVoronoiEdge edge)
Compute whether an edge can be the edge after this one on a face.
|
protected static boolean |
isCCW(org.apache.commons.math3.geometry.euclidean.threed.Vector3D normal,
org.apache.commons.math3.geometry.euclidean.threed.Vector3D aDirection,
org.apache.commons.math3.geometry.euclidean.threed.Vector3D bDirection)
Compute whether, given a face normal, edges with two directions are CCW
|
static void |
joinEdges(BaseVoronoiEdge edge1,
BaseVoronoiEdge edge2)
Join two edges.
|
java.lang.String |
toString() |
protected BaseVoronoiFace EdgeFace
protected BaseVoronoiFace IntersectingFace
EdgeFace
to form this edgeprotected org.apache.commons.math3.geometry.euclidean.threed.Line Line
protected org.apache.commons.math3.geometry.euclidean.threed.Vector3D Direction
protected double Beginning
protected BaseVoronoiEdge NextEdge
protected double End
protected BaseVoronoiEdge PreviousEdge
protected BaseVoronoiEdge()
protected BaseVoronoiEdge(BaseVoronoiFace face, BaseVoronoiFace intersectingFace) throws java.lang.Exception
face
- Plane defining one face containing this edgeintersectingFace
- Plane defining the other face defining this edgejava.lang.Exception
- If faces are parallelpublic static boolean computeIntersection(BaseVoronoiEdge edge1, BaseVoronoiEdge edge2)
edge1
- An edgeedge2
- A second edgeprotected static boolean isCCW(org.apache.commons.math3.geometry.euclidean.threed.Vector3D normal, org.apache.commons.math3.geometry.euclidean.threed.Vector3D aDirection, org.apache.commons.math3.geometry.euclidean.threed.Vector3D bDirection)
normal
- Face normalaDirection
- Direction of edge AbDirection
- Direction of edge Bpublic static void joinEdges(BaseVoronoiEdge edge1, BaseVoronoiEdge edge2) throws java.lang.Exception
Unlike #computeIntersection(vassal.analysis.voronoi.VoronoiEdge, vassal.analysis.voronoi.VoronoiEdge) this operation does not check if the edges intersect within their current bounds.
edge1
- First edgeedge2
- Second edgejava.lang.Exception
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public int compareTo(BaseVoronoiEdge o)
compareTo
in interface java.lang.Comparable<BaseVoronoiEdge>
public org.apache.commons.math3.geometry.euclidean.threed.Line getLine()
public BaseVoronoiFace getEdgeFace()
public BaseVoronoiFace getIntersectingFace()
public BaseVoronoiEdge getNextEdge()
public BaseVoronoiEdge getPreviousEdge()
public abstract BaseVoronoiVertex getStartVertex() throws java.lang.Exception
java.lang.Exception
public abstract BaseVoronoiVertex getEndVertex() throws java.lang.Exception
java.lang.Exception
public double getLength()
public java.lang.String toString()
toString
in class java.lang.Object
public boolean isCCW(BaseVoronoiEdge edge)
edge
- A second edgepublic abstract BaseVoronoiEdge generatePair()