Class ConstraintVertex


  • public class ConstraintVertex
    extends Vertex
    A vertex in a Constrained Delaunay Triangulation. The vertex may or may not lie on a constraint. If it does it may carry extra information about the original constraint.
    • Field Detail

      • isOnConstraint

        private boolean isOnConstraint
      • constraint

        private java.lang.Object constraint
    • Constructor Detail

      • ConstraintVertex

        public ConstraintVertex​(Coordinate p)
        Creates a new constraint vertex
        Parameters:
        p - the location of the vertex
    • Method Detail

      • setOnConstraint

        public void setOnConstraint​(boolean isOnConstraint)
        Sets whether this vertex lies on a constraint.
        Parameters:
        isOnConstraint - true if this vertex lies on a constraint
      • isOnConstraint

        public boolean isOnConstraint()
        Tests whether this vertex lies on a constraint.
        Returns:
        true if the vertex lies on a constraint
      • setConstraint

        public void setConstraint​(java.lang.Object constraint)
        Sets the external constraint information
        Parameters:
        constraint - an object which carries information about the constraint this vertex lies on
      • getConstraint

        public java.lang.Object getConstraint()
        Gets the external constraint object
        Returns:
        the external constraint object
      • merge

        protected void merge​(ConstraintVertex other)
        Merges the constraint data in the vertex other into this vertex. This method is called when an inserted vertex is very close to an existing vertex in the triangulation.
        Parameters:
        other - the constraint vertex to merge