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 Details

    • DelaunayTetrahedralization

      public DelaunayTetrahedralization​(Point3DContainer<T> points, int tetrahedraCount)
      Create a new Delaunay tetrahedralization on the given points.
      Parameters:
      points - the input points.
      tetrahedraCount - the number of tetrahedra.
  • Method Details

    • getTetrahedra

      public List<DelaunayTetrahedron<T>> getTetrahedra()
      Get the tetrahedra that compose this Delaunay tetrahedralization.
      Returns:
      the tetrahedra that compose this Delaunay tetrahedralization.
    • getPoints

      public Point3DContainer<T> getPoints()
      Get the points (vertices) that compose the tetrahedralized space.
      Returns:
      the points (vertices) that compose the tetrahedralized space.
    • addTetrahedron

      public DelaunayTetrahedron<T> addTetrahedron​(int[] vertexIndices)
      Add a tetrahedron to this Delaunay tetrahedralization.
      Parameters:
      vertexIndices - the vertices that compose the tetrahedron.
      Returns:
      the created tetrahedron.
    • addTetrahedron

      public DelaunayTetrahedron<T> addTetrahedron​(DelaunayTetrahedron<T> tetrahedron)
      Add a tetrahedron to this Delaunay tetrahedralization.
      Parameters:
      tetrahedron - the tetrahedron t oadd.
      Returns:
      the added tetrahedron or null if the tetrahedron was not added.
    • getIncidentTetrahedra

      public Collection<DelaunayTetrahedron<T>> getIncidentTetrahedra​(Point3D point)
      Get all the tetrahedra that contain the given point as vertex.
      Parameters:
      point - the point that define a vertex of the tetrahedralization.
      Returns:
      the tetrahedra that contain the given point as vertex or null if the given point is not a vertex of the tetrahedralization.
    • getIncidentTetrahedra

      public Collection<DelaunayTetrahedron<T>> getIncidentTetrahedra​(Point3D u, Point3D v)
      Get all the tetrahedra that share the edge formed by vertices u and v
      Parameters:
      u - the first extremity of the edge.
      v - the second extremity of the edge.
      Returns:
      the tetrahedra that 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

      public boolean addIndicentTetrahedron​(Point3D point, DelaunayTetrahedron<T> tetrahedron)
      Mark the given tetrahedron as incident to the given point.
      Parameters:
      point - the point to mark.
      tetrahedron - the tetrahedron to set as incident to the point.
      Returns:
      true if the tetrahedron is successfully marked as incident of the point and false otherwise.
    • setIncidentTetrahera

      public void setIncidentTetrahera​(Point3D point, int[] incidentTetrahedraIndices)
      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

      public Collection<IndexedFace<T>> getIncidentFaces​(Point3D point)
      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

      public boolean addIndicentTetrahedron​(Point3D point, IndexedFace<T> face)
      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:
      true if the face is successfully added as an incident of the point and false otherwise.
    • getNeighbors

      public List<DelaunayTetrahedron<T>> getNeighbors​(DelaunayTetrahedron<T> tetrahedron)
      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

      public String toString()
      Overrides:
      toString in class Object
    • dual

      public Collection<VoronoiTriangle> dual​(Point3D v)
      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

      public Point3D dual​(DelaunayTetrahedron<T> c)
      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.