Module org.jeometry.algorithm
Class DelaunayTetrahedralization<T extends Point3D>
java.lang.Object
org.jeometry.geom3D.algorithm.delaunay.clarkson.DelaunayTetrahedralization<T>
- Type Parameters:
T- The type of underlying 3D points
public class DelaunayTetrahedralization<T extends Point3D> extends Object
A Delaunay tetrahedralization regarding Ken Clarkson hull algorithm.
- Since:
- 1.0.0
- Version:
- "1.0.5"
- Author:
- Julien Seinturier - COMEX S.A. - contact@jorigin.org - https://github.com/jorigin/jeometry
-
Constructor Summary
Constructors Constructor Description DelaunayTetrahedralization(Point3DContainer<T> points, int tetrahedraCount)Create a new Delaunay tetrahedralization on the given points. -
Method Summary
Modifier and Type Method Description booleanaddIndicentTetrahedron(Point3D point, DelaunayTetrahedron<T> tetrahedron)Mark the giventetrahedronas incident to the givenpoint.booleanaddIndicentTetrahedron(Point3D point, IndexedFace<T> face)Add the given face as incident to the given point.DelaunayTetrahedron<T>addTetrahedron(int[] vertexIndices)Add a tetrahedron to this Delaunay tetrahedralization.DelaunayTetrahedron<T>addTetrahedron(DelaunayTetrahedron<T> tetrahedron)Add a tetrahedron to this Delaunay tetrahedralization.Point3Ddual(DelaunayTetrahedron<T> c)Outputs the Voronoi vertex dual to cell c.Collection<VoronoiTriangle>dual(Point3D v)Outputs the (triangulated) boundary of the Voronoi region dual to vertex v.Collection<IndexedFace<T>>getIncidentFaces(Point3D point)Get all the faces that are incident to the given point.Collection<DelaunayTetrahedron<T>>getIncidentTetrahedra(DelaunayTetrahedron<T> c, int i, int j)Returns the collection of all triangulation cells incident to edge (c,i,j).Collection<DelaunayTetrahedron<T>>getIncidentTetrahedra(Point3D point)Get all thetetrahedrathat contain the givenpointas vertex.Collection<DelaunayTetrahedron<T>>getIncidentTetrahedra(Point3D u, Point3D v)List<DelaunayTetrahedron<T>>getNeighbors(DelaunayTetrahedron<T> tetrahedron)Get the neighbors of the given tetrahedron.Point3DContainer<T>getPoints()Get the points (vertices) that compose the tetrahedralized space.List<DelaunayTetrahedron<T>>getTetrahedra()Get the tetrahedra that compose this Delaunay tetrahedralization.voidsetIncidentTetrahera(Point3D point, int[] incidentTetrahedraIndices)Set the tetrahedra referenced by the given indices as incident to the given point.voidsetNeighbors(DelaunayTetrahedron<T> tetrahedron, List<DelaunayTetrahedron<T>> neighbors)Set the neighbors of the given tetrahedron.StringtoString()
-
Constructor Details
-
DelaunayTetrahedralization
Create a new Delaunay tetrahedralization on the given points.- Parameters:
points- the input points.tetrahedraCount- the number of tetrahedra.
-
-
Method Details
-
getTetrahedra
Get the tetrahedra that compose this Delaunay tetrahedralization.- Returns:
- the tetrahedra that compose this Delaunay tetrahedralization.
-
getPoints
Get the points (vertices) that compose the tetrahedralized space.- Returns:
- the points (vertices) that compose the tetrahedralized space.
-
addTetrahedron
Add a tetrahedron to this Delaunay tetrahedralization.- Parameters:
vertexIndices- the vertices that compose the tetrahedron.- Returns:
- the created tetrahedron.
-
addTetrahedron
Add a tetrahedron to this Delaunay tetrahedralization.- Parameters:
tetrahedron- the tetrahedron t oadd.- Returns:
- the added tetrahedron or
nullif the tetrahedron was not added.
-
getIncidentTetrahedra
Get all thetetrahedrathat contain the givenpointas vertex.- Parameters:
point- thepointthat define a vertex of the tetrahedralization.- Returns:
- the
tetrahedrathat contain the givenpointas vertex ornullif the given point is not a vertex of the tetrahedralization.
-
getIncidentTetrahedra
- Parameters:
u- the first extremity of the edge.v- the second extremity of the edge.- Returns:
- the
tetrahedrathat share the given edge.
-
getIncidentTetrahedra
public Collection<DelaunayTetrahedron<T>> getIncidentTetrahedra(DelaunayTetrahedron<T> c, int i, int j)Returns the collection of all triangulation cells incident to edge (c,i,j).- Parameters:
c- the cell that contains the edge.i- the edge first extremity.j- the edge second extremity.- Returns:
- the collection of all triangulation cells incident to edge (c,i,j).
-
addIndicentTetrahedron
Mark the giventetrahedronas incident to the givenpoint.- Parameters:
point- thepointto mark.tetrahedron- thetetrahedronto set as incident to the point.- Returns:
trueif the tetrahedron is successfully marked as incident of the point andfalseotherwise.
-
setIncidentTetrahera
Set the tetrahedra referenced by the given indices as incident to the given point.- Parameters:
point- the point to process.incidentTetrahedraIndices- the indices of the trtrahedra that are incident to the point.
-
getIncidentFaces
Get all the faces that are incident to the given point.- Parameters:
point- the point to check.- Returns:
- the faces that are incident to the given point.
-
addIndicentTetrahedron
Add the given face as incident to the given point.- Parameters:
point- the point to set.face- the face to add as the point incident.- Returns:
trueif the face is successfully added as an incident of the point andfalseotherwise.
-
getNeighbors
Get the neighbors of the given tetrahedron.- Parameters:
tetrahedron- the tetrahedron to check.- Returns:
- the neighbors of the given tetrahedron.
- See Also:
setNeighbors(DelaunayTetrahedron, List)
-
setNeighbors
public void setNeighbors(DelaunayTetrahedron<T> tetrahedron, List<DelaunayTetrahedron<T>> neighbors)Set the neighbors of the given tetrahedron.- Parameters:
tetrahedron- the tetrahedron to check.neighbors- the neighbors of the given tetrahedron.- See Also:
getNeighbors(DelaunayTetrahedron)
-
toString
-
dual
Outputs the (triangulated) boundary of the Voronoi region dual to vertex v. Each Voronoi face forming the Voronoi region boundary is triangulated. When vertex v lies on the boundary of the convex hull, only the finite faces of the boundary of its region are output. Throws a RuntimeException if v is infinite.- Parameters:
v- the vertex.- Returns:
- the (triangulated) boundary of the Voronoi region dual to given vertex.
-
dual
Outputs the Voronoi vertex dual to cell c. By definition, this vertex coincides with the circumcenter of c. Throws a RuntimeException if c is infinite.- Parameters:
c- the cell.- Returns:
- the Voronoi vertex dual to the given cell.
-