Class TriangulationDSVertex_2<X extends Point_>

java.lang.Object
Jcg.triangulations2D.TriangulationDSVertex_2<X>
All Implemented Interfaces:
Comparable<TriangulationDSVertex_2<X>>

public class TriangulationDSVertex_2<X extends Point_> extends Object implements Comparable<TriangulationDSVertex_2<X>>
The class represents a vertex of a 2D triangulation. Each vertex stores a pointer to one of its incident faces.
Author:
Luca Castelli Aleardi and Steve Oudot (Ecole Polytechnique, 2012-24)
  • Field Details

    • face

      Face incident to the vertex
    • point

      public X extends Point_ point
      Geometric coordinates of the vertex
    • tag

      public int tag
    • index

      public int index
      Index of a vertex: useful for storing additional data associated with vertices
  • Constructor Details

    • TriangulationDSVertex_2

      public TriangulationDSVertex_2()
      Creates an empty vertex, with no associated geometric point.
    • TriangulationDSVertex_2

      public TriangulationDSVertex_2(X point)
      creates a vertex with an associated geometric point.
      Parameters:
      point - geometric coordinates (2D) of the vertex
    • TriangulationDSVertex_2

      public TriangulationDSVertex_2(TriangulationDSFace_2<X> c, X point)
      creates a vertex with an associated geometric point and an associated cell.
  • Method Details

    • setFace

      public void setFace(TriangulationDSFace_2<X> c)
      sets the face associated with the vertex.
    • setPoint

      public void setPoint(X point)
      sets the geometric point associated with the vertex.
    • getPoint

      public X getPoint()
      returns the geometric point associated with the vertex.
    • getFace

      public TriangulationDSFace_2<X> getFace()
      returns the cell associated with the vertex.
    • getHalfedge

      public HalfedgeHandle<X> getHalfedge()
      returns an half-edge handle 'h' incident to the vertex 'v' (the target of 'h' is 'v')
    • toString

      public String toString()
      returns a string listing the coordinates of the geometric point associated with the vertex.
      Overrides:
      toString in class Object
    • compareTo

      public int compareTo(TriangulationDSVertex_2<X> v)
      Specified by:
      compareTo in interface Comparable<X extends Point_>