Class Triangulation_2

java.lang.Object
Jcg.triangulations2D.Triangulation_2
Direct Known Subclasses:
Delaunay_2

public class Triangulation_2 extends Object
Incremental Triangulation using Face/Vertex data structure (TriangulationDS_2).
Author:
Java-code by Luca Castelli-Aleardi and Steve Oudot
  • Field Details

  • Constructor Details

    • Triangulation_2

      public Triangulation_2()
      Constuctor: builds an empty triangulation.
    • Triangulation_2

      public Triangulation_2(Point_2 a, Point_2 b, Point_2 c)
      Constuctor: builds a triangulation consisting of a triangle.
  • Method Details

    • setBoundingBox

      protected void setBoundingBox(double minx, double miny, double maxx, double maxy)
      update the dimension of the bounding box
      Parameters:
      minx - ,miny,maxx,maxy summits of the rectangle
    • updateBoundingBox

      protected void updateBoundingBox(Point_2 p)
    • locate

      Locates point p in the triangulation and returns a triangle containing p.
      Parameters:
      p - the point to locate
      Returns:
      one of the triangles containing p
    • insert

      Inserts point p in the triangulation and returns the newly created vertex
      Parameters:
      p - the point to insert
    • isInfinite

      public boolean isInfinite(Point_2 p)
      Returns true if Point p is infinite, i.e. if it is a vertex of the bounding box
    • isInfinite

      public boolean isInfinite(TriangulationDSVertex_2<Point_2> v)
      Returns true if Vertex v is infinite, i.e. if it is a vertex of the bounding box
    • isInfinite

      public boolean isInfinite(TriangulationDSFace_2<Point_2> f)
      Returns true if Face f is infinite, i.e. if it is connected to a vertex of the bounding box.
    • isInfinite

      public boolean isInfinite(HalfedgeHandle<Point_2> e)
      Returns true if Edge e is infinite, i.e. if it is connected to a vertex of the bounding box.
    • finiteVertices

      public Collection<TriangulationDSVertex_2<Point_2>> finiteVertices()
      Computes and returns the collection of all finite vertices of the triangulation (that is, vertices lying in the interior of the bounding box).
    • finiteFaces

      public Collection<TriangulationDSFace_2<Point_2>> finiteFaces()
      Computes and returns the collection of all finite faces of the triangulation (that is, faces lying in the interior of the bounding box).
    • finiteEdges

      public Collection<HalfedgeHandle<Point_2>> finiteEdges()
      Computes and returns the collection of all finite edges in the triangulation (that is, all edges connecting vertices in the interior of the bounding box).
    • convexHullEdges

      public Collection<HalfedgeHandle<Point_2>> convexHullEdges()
      Computes and returns the collection of all edges on the convex hull (collects only one HalfedgeHandle per geometric edge).
    • isValid

      public boolean isValid()
      checks the combinatorial validity of the triangulation.
    • toString

      public String toString()
      Overrides:
      toString in class Object