Class TriangleFanImpl

java.lang.Object
cz.fidentis.analyst.data.mesh.impl.TriangleFanImpl
All Implemented Interfaces:
TriangleFan, Iterable<MeshTriangle>

public class TriangleFanImpl extends Object implements TriangleFan
The implementation of the triangle fan interface.
  • Constructor Details

    • TriangleFanImpl

      public TriangleFanImpl(MeshFacet facet, int vert)
      Constructor.
      Parameters:
      facet - Mesh facet
      vert - Central vertex for the triangle fan
      Throws:
      IllegalArgumentException - if some parameter is missing or wrong
  • Method Details

    • isEnclosed

      public boolean isEnclosed()
      Returns true if the triangle fan is enclosed (i.e., is not boundary).
      Specified by:
      isEnclosed in interface TriangleFan
      Returns:
      true if the triangle fan is enclosed (i.e., is not boundary).
    • isBoundary

      public boolean isBoundary()
      Returns true if the triangle fan is boundary (i.e., is not enclosed).
      Specified by:
      isBoundary in interface TriangleFan
      Returns:
      true if the triangle fan is enclosed (i.e., is not boundary).
    • getVertices

      public List<Integer> getVertices()
      Vertex indices of the 1-ring neighborhood. If the triangle fan is enclosed then the first and last vertices are the same.
      Specified by:
      getVertices in interface TriangleFan
      Returns:
      Vertex indices of the 1-ring neighborhood.
    • getTriangles

      public List<Integer> getTriangles()
      Triangle indices of the 1-ring neighborhood. The first triangle is related to the edge delimited by first and second vertex, etc. The number of triangles corresponds to the number of vertices minus one.
      Specified by:
      getTriangles in interface TriangleFan
      Returns:
      Triangle indices of the 1-ring neighborhood.
    • iterator

      public Iterator<MeshTriangle> iterator()
      Description copied from interface: TriangleFan
      Vertex 1 of the returned triangle always corresponds to the central vertex around which the triangle fan is constructed.
      Specified by:
      iterator in interface Iterable<MeshTriangle>
      Specified by:
      iterator in interface TriangleFan
      Returns:
      A mesh triangle