Module org.jeometry.algorithm
Class DelaunayTetrahedron<T extends Point3D>
java.lang.Object
org.jeometry.geom3D.algorithm.delaunay.clarkson.DelaunayTetrahedron<T>
- Type Parameters:
T- The type of underlying 3D points
- All Implemented Interfaces:
IndexedTetrahedron<T>
public class DelaunayTetrahedron<T extends Point3D> extends Object implements IndexedTetrahedron<T>
A
tetrahedron
that comes from a Delaunay tetrahedralization. This tetrahedron can provide its neighbourhood and its incidencies.- Author:
- Julien Seinturier
-
Field Summary
Fields inherited from interface org.jeometry.geom3D.primitive.indexed.IndexedTetrahedron
FACE_1, FACE_2, FACE_3, FACE_4, FACE_BASE, VERTEX_BASE_1, VERTEX_BASE_2, VERTEX_BASE_3, VERTEX_TOP -
Constructor Summary
Constructors Constructor Description DelaunayTetrahedron(int base1, int base2, int base3, int top, boolean validate, Point3DContainer<T> source)Construct a new Delaunay tetrahedron from the given point source and the given vertex indices.DelaunayTetrahedron(int vertex1, int vertex2, int vertex3, int vertex4, Point3DContainer<T> source)Construct a new Delaunay tetrahedron from the given point source and the given vertex indices. -
Method Summary
Modifier and Type Method Description int[]getConvexHullFaces()Get the indexes of faces of this tetrahedron that lie on the underlying point set convex hull.DelaunayTetrahedron<T>getNeighbor(int vertexIndex)Get the neighbor of this tetrahedron that is linked by the face in front of the vertex indexed by givenvertexIndex.Point3DgetVertex(int position)intgetVertexIndex(Point3D vertex)intgetVertexIndice(int position)int[]getVerticesArray()Point3DContainer<T>getVerticesSource()booleanisConvexHull()Check if this tetrahedron contains a face that lies on the underlying points convex hull.booleanisConvexHullFace(int index)Get if the face indexed by the givenindexlies on the underlying points convex hull.booleanisInfinite()Get if this tetrahedron is infinite.booleanisVertex(Point3D point)Check if the givenpointis a vertex of the tetrahedron.voidsetConvexHullFace(int index, boolean isConxehHull)Set if the face indexed by the givenindexlies on the underlying points convex hull.voidsetInfinite(boolean infinite)Set if this tetrahedron is infinite.voidsetNeighbor(int vertexIndex, DelaunayTetrahedron<T> tetrahedron)Set the neighbor of this tetrahedron that is linked by the face in front of the vertex indexed by givenvertexIndex.voidsetVerticesSource(Point3DContainer<T> verticesSource)
-
Constructor Details
-
DelaunayTetrahedron
public DelaunayTetrahedron(int vertex1, int vertex2, int vertex3, int vertex4, Point3DContainer<T> source)Construct a new Delaunay tetrahedron from the given point source and the given vertex indices.- Parameters:
vertex1- the vertex1 index.vertex2- the vertex2 index.vertex3- the vertex3 index.vertex4- the vertex4 index.source- the point source.
-
DelaunayTetrahedron
public DelaunayTetrahedron(int base1, int base2, int base3, int top, boolean validate, Point3DContainer<T> source)Construct a new Delaunay tetrahedron from the given point source and the given vertex indices.- Parameters:
base1- the first vertex index.base2- the second vertex index.base3- the third vertex index.top- the fourth vertex index.source- the vertex source.validate- if the tetrahedron has to be validated
-
-
Method Details
-
getNeighbor
Get the neighbor of this tetrahedron that is linked by the face in front of the vertex indexed by givenvertexIndex.- Parameters:
vertexIndex- the index of the vertex in front of the shared face between this tetrahedron and its neighbor.- Returns:
- the neighbor of this tetrahedron.
- See Also:
setNeighbor(int, DelaunayTetrahedron)
-
getVerticesSource
- Specified by:
getVerticesSourcein interfaceIndexedTetrahedron<T extends Point3D>
-
setVerticesSource
- Specified by:
setVerticesSourcein interfaceIndexedTetrahedron<T extends Point3D>
-
getVertexIndice
public int getVertexIndice(int position)- Specified by:
getVertexIndicein interfaceIndexedTetrahedron<T extends Point3D>
-
getVertex
- Specified by:
getVertexin interfaceIndexedTetrahedron<T extends Point3D>
-
getVertexIndex
- Specified by:
getVertexIndexin interfaceIndexedTetrahedron<T extends Point3D>
-
getVerticesArray
public int[] getVerticesArray()- Specified by:
getVerticesArrayin interfaceIndexedTetrahedron<T extends Point3D>
-
setNeighbor
Set the neighbor of this tetrahedron that is linked by the face in front of the vertex indexed by givenvertexIndex.- Parameters:
vertexIndex- the index of the vertex in front of the shared face between this tetrahedron and its neighbor.tetrahedron- the neighbor.- See Also:
getNeighbor(int)
-
isVertex
Check if the givenpointis a vertex of the tetrahedron.- Parameters:
point- thepointto check.- Returns:
trueif the given point is a vertex of the tetrahedron andfalseotherwise.
-
isConvexHullFace
public boolean isConvexHullFace(int index)Get if the face indexed by the givenindexlies on the underlying points convex hull.- Parameters:
index- the index of the face to check (between 0 and 3).- Returns:
trueif the face indexed by the givenindexlies on the underlying points convex hull andfalseotherwise.
-
setConvexHullFace
public void setConvexHullFace(int index, boolean isConxehHull)Set if the face indexed by the givenindexlies on the underlying points convex hull.- Parameters:
index- the index of the face to check (between 0 and 3).isConxehHull-trueif the face indexed by the givenindexlies on the underlying points convex hull andfalseotherwise.
-
getConvexHullFaces
public int[] getConvexHullFaces()Get the indexes of faces of this tetrahedron that lie on the underlying point set convex hull.- Returns:
- the indexes of faces of this tetrahedron that lie on the underlying point set convex hull.
-
isConvexHull
public boolean isConvexHull()Check if this tetrahedron contains a face that lies on the underlying points convex hull.- Returns:
trueif this tetrahedron contains a face that lies on the underlying points convex hull andfalseotherwise.
-
isInfinite
public boolean isInfinite()Get if this tetrahedron is infinite. An infinite tetrahedron is by convention a tetrahedron that relies on a point that is par of the bounding volume of the underlying points.- Returns:
trueif the tetrahedron is infinite andfalseotherwise.- See Also:
setInfinite(boolean)
-
setInfinite
public void setInfinite(boolean infinite)Set if this tetrahedron is infinite. An infinite tetrahedron is by convention a tetrahedron that relies on a point that is par of the bounding volume of the underlying points.- Parameters:
infinite-trueif the tetrahedron is infinite andfalseotherwise.- See Also:
isInfinite()
-