V - the corresponding vertex classE - the corresponding edge classF - the corresponding face classpublic abstract class Edge<V extends Vertex<V,E,F>,E extends Edge<V,E,F>,F extends Face<V,E,F>> extends Node<V,E,F>
HalfEdgeDataStructure.
Any subclass that is to be used with a HalfEdgeDataStructure
must provide a default constructor accessible to HalfEdgeDataStructure.
The following invariants are maintained:
this.getNextEdge() == null || this == getNextEdge().getPreviousEdge()
this.getPreviousEdge() == null || this == getPreviousEdge().getNextEdge()
this.getOppositeEdge() == null || this == this.getOppositeEdge().getOppositeEdge()
this.getOppositeEdge() == null || this.isPositive() != getOppositeEdge().isPositive()
| Modifier and Type | Class and Description |
|---|---|
static class |
Edge.Naked |
| Modifier | Constructor and Description |
|---|---|
protected |
Edge() |
| Modifier and Type | Method and Description |
|---|---|
void |
copyData(E e)
Copies the data fields of the given edge into this edge
|
F |
getLeftFace()
Returns the face on the left of this edge.
|
E |
getNextEdge()
Returns the next edge of the left face (or boundary component) of this edge.
|
E |
getOppositeEdge()
Returns the opposite edge.
|
E |
getPreviousEdge()
Returns the previous edge of the left face (or boundary component) of this edge.
|
F |
getRightFace()
Returns the face on the right of this edge.
|
V |
getStartVertex()
Returns the start vertex of this edge.
|
V |
getTargetVertex()
Returns the target vertex of this edge.
|
boolean |
isPositive()
Is this edge positive?
|
void |
linkNextEdge(E nextEdge)
Links this edge with a new next edge.
|
void |
linkOppositeEdge(E oppositeEdge)
|
void |
linkPreviousEdge(E previousEdge)
Links this edge with a new previous edge.
|
void |
setIsPositive(boolean signature)
Set value returned by
isPositive(), and if getOppositeEdge()
is not null adjust value returned by getOppositeEdge().isPositive(). |
void |
setLeftFace(F f)
Sets the left face of this edge.
|
protected void |
setSelf(E self) |
void |
setTargetVertex(V v)
Sets the target vertex of this edge.
|
public void copyData(E e)
e - public final F getLeftFace()
null.public final E getNextEdge()
public final E getOppositeEdge()
public final E getPreviousEdge()
public final F getRightFace()
public final V getStartVertex()
public final V getTargetVertex()
null.public final boolean isPositive()
public final void linkNextEdge(E nextEdge)
HalfEdgeDataStructure as this edge.nextEdge - the new next edge, may be nullpublic final void linkOppositeEdge(E oppositeEdge)
oppositeEdge - may be null.public final void linkPreviousEdge(E previousEdge)
HalfEdgeDataStructure as this edge.previousEdge - the new previous edge, may be nullpublic final void setIsPositive(boolean signature)
isPositive(), and if getOppositeEdge()
is not null adjust value returned by getOppositeEdge().isPositive().signature - true for positive, false for negative.public final void setLeftFace(F f)
HalfEdgeDataStructure as this edge.f - the left face, may be null.protected final void setSelf(E self)
public final void setTargetVertex(V v)
HalfEdgeDataStructure as this edge.v - the target vertex