public class TriangulationDSFace_2<X extends Point_> extends java.lang.Object implements java.lang.Comparable<TriangulationDSFace_2<X>>
Constructor and Description |
---|
TriangulationDSFace_2()
creates an empty cell, whose vertices and neighbors need to be specified later.
|
TriangulationDSFace_2(TriangulationDSVertex_2<X> v0,
TriangulationDSVertex_2<X> v1,
TriangulationDSVertex_2<X> v2,
TriangulationDSFace_2<X> c0,
TriangulationDSFace_2<X> c1,
TriangulationDSFace_2<X> c2)
creates a face with vertices v0 through v2 and with neighbors c0 through c2.
|
Modifier and Type | Method and Description |
---|---|
int |
compareTo(TriangulationDSFace_2<X> f)
compares the face to another face using a clockwise order on their vertices
|
boolean |
hasGeometricNeighbor(TriangulationDSFace_2<X> c)
checks whether c is geometrically a neighbor of the face, that is, whether the two triangles
share a common edge.
|
boolean |
hasNeighbor(TriangulationDSFace_2<X> c)
checks whether c is a neighbor of the face.
|
boolean |
hasVertex(TriangulationDSVertex_2<X> v)
checks whether v is a vertex of the cell.
|
boolean |
hasVertex(X x)
checks whether x is a point associated with a vertex of the face.
|
int |
index(TriangulationDSFace_2<X> c)
returns the index of the neighboring face c,
and throws an Error if c is no neighbor of the face.
|
int |
index(TriangulationDSVertex_2<X> v)
returns the index of vertex v in the cell, and throws an Error if v is no vertex of the cell.
|
int |
index(X x)
returns the index of the vertex of the face associated with x, and throws an Error if x is
associated with no vertex of the face.
|
void |
invertMark(int index)
inverts the mark of the index-th edge
|
boolean |
isMarked(int index)
returns the mark of the index-th edge
|
void |
mark(int index)
sets the mark of the index-th edge
|
TriangulationDSFace_2<X> |
neighbor(int i)
returns a pointer to the i-th neighbor of the cell (0<=i<3),
which is by definition the one opposite to the i-th vertex of the cell.
|
void |
setNeighbor(int i,
TriangulationDSFace_2<X> c)
sets the i-th neighbor of the cell to be c (0<=i<3).
|
void |
setVertex(int i,
TriangulationDSVertex_2<X> v)
sets the i-th vertex of the cell to be v (0<=i<3).
|
java.lang.String |
toString()
generates a string listing the coordinates of the vertices of the face.
|
void |
unmark(int index)
unsets the mark of the index-th edge
|
TriangulationDSVertex_2<X> |
vertex(int i)
returns a pointer to the i-th vertex of the triangle (0<=i<3).
|
Point_[] |
verticesPoints()
returns an array containing the geometric points associated with the vertices of the triangle
|
public TriangulationDSFace_2()
public TriangulationDSFace_2(TriangulationDSVertex_2<X> v0, TriangulationDSVertex_2<X> v1, TriangulationDSVertex_2<X> v2, TriangulationDSFace_2<X> c0, TriangulationDSFace_2<X> c1, TriangulationDSFace_2<X> c2)
public TriangulationDSVertex_2<X> vertex(int i)
public Point_[] verticesPoints()
public TriangulationDSFace_2<X> neighbor(int i)
public void setVertex(int i, TriangulationDSVertex_2<X> v)
public void setNeighbor(int i, TriangulationDSFace_2<X> c)
public int index(TriangulationDSVertex_2<X> v)
public int index(TriangulationDSFace_2<X> c)
public boolean hasVertex(TriangulationDSVertex_2<X> v)
public boolean hasVertex(X x)
public int index(X x)
public boolean hasNeighbor(TriangulationDSFace_2<X> c)
public boolean hasGeometricNeighbor(TriangulationDSFace_2<X> c)
public java.lang.String toString()
toString
in class java.lang.Object
public int compareTo(TriangulationDSFace_2<X> f)
compareTo
in interface java.lang.Comparable<TriangulationDSFace_2<X extends Point_>>
public boolean isMarked(int index)
public void mark(int index)
public void unmark(int index)
public void invertMark(int index)