de.grogra.imp3d.math.delaunay
public class Tetrahedron extends java.lang.Object implements java.lang.Iterable<OrientedFace>, java.io.Serializable
| Constructor and Description |
|---|
Tetrahedron(VoronoiCell[] vertices)
Construct a tetrahedron from the array of four vertices
|
Tetrahedron(VoronoiCell x,
VoronoiCell y,
VoronoiCell z,
VoronoiCell w)
Construct a tetrahedron from the four vertices
|
| Modifier and Type | Method and Description |
|---|---|
void |
addFaces(java.util.List<VoronoiCell[]> faces)
Add the four faces defined by the tetrahedron to the list of faces
|
void |
addFacesCoordinates(java.util.List<Point3d[]> faces)
Add the four faces defined by the tetrahedron to the list of faces
|
Tetrahedron |
flip1to4(VoronoiCell n,
java.util.List<OrientedFace> ears)
Perform the 1 -> 4 bistellar flip.
|
OrientedFace |
getFace(V v)
Answer the oriented face of the tetrahedron
|
OrientedFace |
getFace(VoronoiCell v)
Answer the oriented face opposite the vertex
|
Tetrahedron |
getNeighbor(V v)
Answer the neighbor that is adjacent to the face opposite of the vertex
|
Tetrahedron |
getNeighbor(VoronoiCell vertex)
Answer the neighbor that is adjacent to the face opposite of the vertex
|
VoronoiCell |
getVertex(V v)
Answer the vertex of the tetrahedron
|
VoronoiCell[] |
getVertices()
Answer the four vertices that define the tetrahedron
|
Point3d[] |
getVerticesPoint3d()
Answer the four vertices that define the tetrahedron
|
boolean |
includes(VoronoiCell query) |
boolean |
inSphere(VoronoiCell query)
Answer true if the query point is contained in the circumsphere of the
tetrahedron
|
java.util.Iterator<OrientedFace> |
iterator()
Answer the iterator over the faces of the tetrahedron
|
V |
ordinalOf(VoronoiCell v)
Answer the vertex indicator of the the point
|
int |
orientationWrt(V face,
VoronoiCell query)
Answer 1 if the query point is positively oriented with respect to the
face opposite the vertex, -1 if negatively oriented, 0 if the query point
is coplanar to the face
|
int |
orientationWrtADB(VoronoiCell query)
Answer 1 if the query point is positively oriented with respect to the
face ADB, -1 if negatively oriented, 0 if the query point is coplanar to
the face
|
int |
orientationWrtBCA(VoronoiCell query)
Answer 1 if the query point is positively oriented with respect to the
face BCA, -1 if negatively oriented, 0 if the query point is coplanar to
the face
|
int |
orientationWrtCBD(VoronoiCell query)
Answer 1 if the query point is positively oriented with respect to the
face CBD, -1 if negatively oriented, 0 if the query point is coplanar to
the face
|
int |
orientationWrtDAC(VoronoiCell query)
Answer 1 if the query point is positively oriented with respect to the
face DAC, -1 if negatively oriented, 0 if the query point is coplanar to
the face
|
java.lang.String |
toString() |
void |
traverse(java.util.Set<Tetrahedron> visited,
java.util.Set<VoronoiCell> vertices)
Traverse all the tetradrons in a tetrahedralization, filling in the set
of all visited tetrahedron and the vertices defining them
|
public Tetrahedron(VoronoiCell[] vertices)
vertices - public Tetrahedron(VoronoiCell x, VoronoiCell y, VoronoiCell z, VoronoiCell w)
x - y - z - w - public void addFaces(java.util.List<VoronoiCell[]> faces)
faces - public void addFacesCoordinates(java.util.List<Point3d[]> faces)
faces - public Tetrahedron flip1to4(VoronoiCell n, java.util.List<OrientedFace> ears)
n - - the inserted pointears - - the stack of oriented faces that make up the ears of the
inserted pointpublic OrientedFace getFace(V v)
v - - the vertex opposite the facepublic OrientedFace getFace(VoronoiCell v)
v - public Tetrahedron getNeighbor(V v)
v - - the opposing vertex defining the facepublic Tetrahedron getNeighbor(VoronoiCell vertex)
vertex - public VoronoiCell getVertex(V v)
v - the vertexpublic VoronoiCell[] getVertices()
public Point3d[] getVerticesPoint3d()
public boolean includes(VoronoiCell query)
public boolean inSphere(VoronoiCell query)
query - public java.util.Iterator<OrientedFace> iterator()
iterator in interface java.lang.Iterable<OrientedFace>public V ordinalOf(VoronoiCell v)
v - - the vertexpublic int orientationWrt(V face, VoronoiCell query)
face - query - public int orientationWrtADB(VoronoiCell query)
query - public int orientationWrtBCA(VoronoiCell query)
query - public int orientationWrtCBD(VoronoiCell query)
query - public int orientationWrtDAC(VoronoiCell query)
query - public java.lang.String toString()
toString in class java.lang.Objectpublic void traverse(java.util.Set<Tetrahedron> visited, java.util.Set<VoronoiCell> vertices)
visited - - the set of visited tetrahedronsvertices - - the set of visited vertices