Class HalfedgeHandle<X extends Point_>
java.lang.Object
Jcg.triangulations2D.HalfedgeHandle<X>
A dummy class used to represent a triangulation edge as a pair (TriangulationDSFace_2, int).
The integer parameter is the index of the vertex opposite to the edge in the triangle.
Note that no edge is explicitly stored in the triangulation data structure,
as this information is redundant with the one provided by
the faces themselves and their vertices.
- Author:
- Luca Castelli Aleardi
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate TriangulationDSFace_2<X> private TriangulationDSVertex_2<X> private intprivate TriangulationDSVertex_2<X> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleantests equality between EdgeHandles, which is defined by equality of their vertices.getFace()returns the face containing the half-edge.getNext()returns next half-edge in ccw order in the same face.returns opposite half-edge (lying in the adjacent face).getPrev()returns the previous half-edge in ccw order in the same face.returns the source vertex incident to the half-edge.returns the (destination) vertex incident the half-edge.getVertex(int index) returns the vertex of prescribed index in the edge: 0 for origin, 1 for destinationinthashCode()provides a hashing index for a EdgeHandle, based on the hashing indices of its vertices.booleanreturns whether the current edge has v as vertex.intindex()returns the index of the vertex opposite of the current edge in the corresponding incident face.intreturns the index of v in the current edge.voidinverts the mark of the edge (the mark of the opposite edge remains unchanged)booleanisMarked()returns the mark of the edgevoidmark()sets the mark of the edge (the mark of the opposite edge remains unchanged)voidsetMark(boolean m) sets the mark of the edge (the mark of the opposite edge remains unchanged)toString()voidunmark()unsets the mark of the edge (the mark of the opposite edge remains unchanged)
-
Field Details
-
c
-
ind
private int ind -
orig
-
dest
-
-
Constructor Details
-
HalfedgeHandle
-
-
Method Details
-
getFace
returns the face containing the half-edge. -
getVertex
returns the (destination) vertex incident the half-edge. -
getSource
returns the source vertex incident to the half-edge. -
getNext
returns next half-edge in ccw order in the same face. -
getPrev
returns the previous half-edge in ccw order in the same face. -
getOpposite
returns opposite half-edge (lying in the adjacent face). -
getVertex
returns the vertex of prescribed index in the edge: 0 for origin, 1 for destination -
index
public int index()returns the index of the vertex opposite of the current edge in the corresponding incident face. -
hasVertex
returns whether the current edge has v as vertex. -
index
returns the index of v in the current edge. The pre-requisite is that v must be a vertex of the edge. -
equals
-
hashCode
-
toString
-
isMarked
public boolean isMarked()returns the mark of the edge -
mark
public void mark()sets the mark of the edge (the mark of the opposite edge remains unchanged) -
unmark
public void unmark()unsets the mark of the edge (the mark of the opposite edge remains unchanged) -
invertMark
public void invertMark()inverts the mark of the edge (the mark of the opposite edge remains unchanged) -
setMark
public void setMark(boolean m) sets the mark of the edge (the mark of the opposite edge remains unchanged)
-