java.lang.Object
de.grogra.imp3d.math.delaunay.Tetrahedron
- All Implemented Interfaces:
Serializable
,Iterable<OrientedFace>
An oriented, delaunay tetrahedral cell. The vertices of the tetrahedron are
A, B, C and D. The vertices {A, B, C} are positively oriented with respect to
the fourth vertex D.
- Author:
- Hal Hildebrand
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionTetrahedron
(VoronoiCell[] vertices) Construct a tetrahedron from the array of four verticesTetrahedron
(VoronoiCell x, VoronoiCell y, VoronoiCell z, VoronoiCell w) Construct a tetrahedron from the four vertices -
Method Summary
Modifier and TypeMethodDescriptionvoid
addFaces
(List<VoronoiCell[]> faces) Add the four faces defined by the tetrahedron to the list of facesvoid
addFacesCoordinates
(List<Point3d[]> faces) Add the four faces defined by the tetrahedron to the list of facesflip1to4
(VoronoiCell n, List<OrientedFace> ears) Perform the 1 -> 4 bistellar flip.Answer the oriented face of the tetrahedronAnswer the oriented face opposite the vertexgetNeighbor
(V v) Answer the neighbor that is adjacent to the face opposite of the vertexgetNeighbor
(VoronoiCell vertex) Answer the neighbor that is adjacent to the face opposite of the vertexAnswer the vertex of the tetrahedronAnswer the four vertices that define the tetrahedronPoint3d[]
Answer the four vertices that define the tetrahedronboolean
includes
(VoronoiCell query) boolean
inSphere
(VoronoiCell query) Answer true if the query point is contained in the circumsphere of the tetrahedroniterator()
Answer the iterator over the faces of the tetrahedronAnswer the vertex indicator of the the pointint
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 faceint
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 faceint
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 faceint
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 faceint
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 facetoString()
void
traverse
(Set<Tetrahedron> visited, Set<VoronoiCell> vertices) Traverse all the tetradrons in a tetrahedralization, filling in the set of all visited tetrahedron and the vertices defining themMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
Tetrahedron
Construct a tetrahedron from the four vertices- Parameters:
x
-y
-z
-w
-
-
Tetrahedron
Construct a tetrahedron from the array of four vertices- Parameters:
vertices
-
-
-
Method Details
-
addFaces
Add the four faces defined by the tetrahedron to the list of faces- Parameters:
faces
-
-
addFacesCoordinates
Add the four faces defined by the tetrahedron to the list of faces- Parameters:
faces
-
-
flip1to4
Perform the 1 -> 4 bistellar flip. This produces 4 new tetrahedron from the original tetrahdron, by inserting the new point in the interior of the receiver tetrahedron. The star set of the newly inserted point is pushed onto the supplied stack.- Parameters:
n
- - the inserted pointears
- - the stack of oriented faces that make up the ears of the inserted point- Returns:
- one of the four new tetrahedra
-
getFace
Answer the oriented face of the tetrahedron- Parameters:
v
- - the vertex opposite the face- Returns:
- the OrientedFace
-
getFace
Answer the oriented face opposite the vertex- Parameters:
v
-- Returns:
-
getNeighbor
Answer the neighbor that is adjacent to the face opposite of the vertex- Parameters:
v
- - the opposing vertex defining the face- Returns:
- the neighboring tetrahedron, or null if none.
-
getNeighbor
Answer the neighbor that is adjacent to the face opposite of the vertex- Parameters:
vertex
-- Returns:
-
getVertex
Answer the vertex of the tetrahedron- Parameters:
v
- the vertex- Returns:
- the vertex
-
getVertices
Answer the four vertices that define the tetrahedron- Returns:
-
getVerticesPoint3d
Answer the four vertices that define the tetrahedron- Returns:
-
includes
-
inSphere
Answer true if the query point is contained in the circumsphere of the tetrahedron- Parameters:
query
-- Returns:
-
iterator
Answer the iterator over the faces of the tetrahedron- Specified by:
iterator
in interfaceIterable<OrientedFace>
- Returns:
- the iterator of the faces, in the order of the index their opposite vertex
-
ordinalOf
Answer the vertex indicator of the the point- Parameters:
v
- - the vertex- Returns:
- the indicator of this vertex or null if not a vertex of this tetrahedron or the supplied vertex is null
-
orientationWrt
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- Parameters:
face
-query
-- Returns:
-
orientationWrtADB
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- Parameters:
query
-- Returns:
-
orientationWrtBCA
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- Parameters:
query
-- Returns:
-
orientationWrtCBD
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- Parameters:
query
-- Returns:
-
orientationWrtDAC
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- Parameters:
query
-- Returns:
-
toString
-
traverse
Traverse all the tetradrons in a tetrahedralization, filling in the set of all visited tetrahedron and the vertices defining them- Parameters:
visited
- - the set of visited tetrahedronsvertices
- - the set of visited vertices
-