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
  • 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

      public DelaunayTetrahedron<T> getNeighbor​(int vertexIndex)
      Get the neighbor of this tetrahedron that is linked by the face in front of the vertex indexed by given vertexIndex.
      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

      public Point3DContainer<T> getVerticesSource()
      Specified by:
      getVerticesSource in interface IndexedTetrahedron<T extends Point3D>
    • setVerticesSource

      public void setVerticesSource​(Point3DContainer<T> verticesSource)
      Specified by:
      setVerticesSource in interface IndexedTetrahedron<T extends Point3D>
    • getVertexIndice

      public int getVertexIndice​(int position)
      Specified by:
      getVertexIndice in interface IndexedTetrahedron<T extends Point3D>
    • getVertex

      public Point3D getVertex​(int position)
      Specified by:
      getVertex in interface IndexedTetrahedron<T extends Point3D>
    • getVertexIndex

      public int getVertexIndex​(Point3D vertex)
      Specified by:
      getVertexIndex in interface IndexedTetrahedron<T extends Point3D>
    • getVerticesArray

      public int[] getVerticesArray()
      Specified by:
      getVerticesArray in interface IndexedTetrahedron<T extends Point3D>
    • setNeighbor

      public void setNeighbor​(int vertexIndex, DelaunayTetrahedron<T> tetrahedron)
      Set the neighbor of this tetrahedron that is linked by the face in front of the vertex indexed by given vertexIndex.
      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

      public boolean isVertex​(Point3D point)
      Check if the given point is a vertex of the tetrahedron.
      Parameters:
      point - the point to check.
      Returns:
      true if the given point is a vertex of the tetrahedron and false otherwise.
    • isConvexHullFace

      public boolean isConvexHullFace​(int index)
      Get if the face indexed by the given index lies on the underlying points convex hull.
      Parameters:
      index - the index of the face to check (between 0 and 3).
      Returns:
      true if the face indexed by the given index lies on the underlying points convex hull and false otherwise.
    • setConvexHullFace

      public void setConvexHullFace​(int index, boolean isConxehHull)
      Set if the face indexed by the given index lies on the underlying points convex hull.
      Parameters:
      index - the index of the face to check (between 0 and 3).
      isConxehHull - true if the face indexed by the given index lies on the underlying points convex hull and false otherwise.
    • 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:
      true if this tetrahedron contains a face that lies on the underlying points convex hull and false otherwise.
    • 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:
      true if the tetrahedron is infinite and false otherwise.
      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 - true if the tetrahedron is infinite and false otherwise.
      See Also:
      isInfinite()