Module imp3d

Class OrientedFace

java.lang.Object
de.grogra.imp3d.math.delaunay.OrientedFace
All Implemented Interfaces:
Iterable<VoronoiCell>

public abstract class OrientedFace extends Object implements Iterable<VoronoiCell>
An oriented face of a tetrahedron.

Author:
Hal Hildebrand
  • Field Details

    • adjacentVertexOrdinal

      protected final V adjacentVertexOrdinal
      The vertex in the adjacent tetrahedron opposite of this face
  • Constructor Details

    • OrientedFace

      public OrientedFace()
  • Method Details

    • flip

      public boolean flip(int index, LinkedList<OrientedFace> ears, VoronoiCell n)
      Perform a flip for deletion of the vertex from the tetrahedralization. The incident and adjacent tetrahedra form an ear of the star set of tetrahedra adjacent to v.

      Parameters:
      index - - the index of the receiver in the list of ears
      ears - - the list of ears of the vertex
      n - - the vertex to be deleted
      Returns:
      true if the receiver is to be deleted from the list of ears
    • flip

      public Tetrahedron flip(VoronoiCell n, List<OrientedFace> ears)
      Perform the flip which incrementally restores the delaunay condition after the vertex has been inserted into the tetrahedralization.

      Parameters:
      n - - the inserted vertex
      ears - - the stack of oriented faces left to process
      Returns:
      - the last valid tetrahedron noted, or null if no flip was performed.
    • flip2to3

      public Tetrahedron[] flip2to3()
      Perform the bistellar flip 2 -> 3. This produces three new tetrahedra from the receiver and tetrahdron that shares the receiver face
      Returns:
      the three created tetrahedron
    • flip3to2

      public Tetrahedron[] flip3to2(int reflexEdge)
      Perform the bistellar 3->2 flip. This flip constructs two new tetrahedra from the two tetraheda determined by the incident and adjacent neighbor of the face, along with the tetrahedron on the reflexive edge of the face.

      Parameters:
      reflexiveEdge - - the vertex opposite the reflexive edge of the face
      Returns:
      the two created tetrahedron
    • getAdjacent

      public abstract Tetrahedron getAdjacent()
      Answer the adjacent tetrahedron to the face
      Returns:
    • getAdjacentVertex

      public VoronoiCell getAdjacentVertex()
      Answer the vertex in the adjacent tetrahedron which is opposite of this face.
      Returns:
    • getAdjacentVertexOrdinal

      public V getAdjacentVertexOrdinal()
      Answer the canonical ordinal of the vertex in the adjacent tetrahedron which is opposite of this face.
      Returns:
    • getIncident

      public abstract Tetrahedron getIncident()
      Answer the tetrahedron which is incident with this face
      Returns:
    • getIncidentVertex

      public abstract VoronoiCell getIncidentVertex()
      Answer the vertex in the tetrahedron which is opposite of this face
      Returns:
    • getVertex

      public abstract VoronoiCell getVertex(int anIndex)
      Answer the canonical vertex for this face
      Parameters:
      anIndex -
      Returns:
    • hasAdjacent

      public boolean hasAdjacent()
    • includes

      public abstract boolean includes(VoronoiCell v)
    • indexOf

      public abstract int indexOf(VoronoiCell v)
      Answer the edge index corresponding to the vertex
      Parameters:
      v - - the vertex
      Returns:
      the index of the edge
    • isConvex

      public abstract boolean isConvex(int vertex)
      Answer true if the faces joined by the edge are concave when viewed from the originating tetrahedron.

      Parameters:
      vertex - - the vertex of the face that is opposite of the edge
      Returns:
      true if the faces joined by the edge are convex, false if these faces are not convex
    • isReflex

      public abstract boolean isReflex(int vertex)
      Answer true if the faces joined by the edge are not concave when viewed from the originating tetrahedron.

      Parameters:
      vertex - - the vertex of the face that is opposite of the edge
      Returns:
      true if the faces joined by the edge are reflex, false if these faces are not reflex
    • isRegular

      public boolean isRegular()
      Answer true if the vertex in the adjacent tetrahedron is not contained in the circumsphere of the incident tetrahedron
      Returns:
    • iterator

      public Iterator<VoronoiCell> iterator()
      Specified by:
      iterator in interface Iterable<VoronoiCell>
    • getEdge

      public abstract VoronoiCell[] getEdge(VoronoiCell v)
      Answer the two vertices defining the edge opposite of the vertex v
      Parameters:
      v - - the vertex defining the edge
      Returns:
      the array of two vertices defining the edge
    • orientationOf

      public abstract int orientationOf(VoronoiCell query)
      Answer +1 if the orientation of the query point is positive with respect to this face, -1 if negative and 0 if the test point is coplanar with the face
      Parameters:
      query - - the point to be tested
      Returns:
      +1 if the orientation of the query point is positive with respect to the face, -1 if negative and 0 if the query point is coplanar