Class TriangulationPoint


  • public class TriangulationPoint
    extends Object
    This adds geometric primitives to ILocations to support DelaunayTriangulation. These primitives are defined in guibas and stolfi.
    Version:
    $revision$
    Author:
    Howe
    • Field Detail

      • contents

        public Object contents
    • Constructor Detail

      • TriangulationPoint

        public TriangulationPoint​(double x,
                                  double y,
                                  Object contents)
        Construct a new TriangulationPoint using an x and a y cooridnate.
        Parameters:
        x - The x coordinate of the point.
        y - The y coordinate of the point.
    • Method Detail

      • getContents

        public Object getContents()
        Construct a new TriangulationPoint using an ILocation object.
        Parameters:
        loc - The location to be triangulated.
      • isOn

        public boolean isOn​(QuadEdge e)
        Is this point on the supplied edge?
        Parameters:
        e - The edge to test.
        Returns:
        true if this point is on the edge.
      • isRightOf

        public boolean isRightOf​(QuadEdge e)
        Is this point to the right of the supplied Edge.
        Parameters:
        e - The edge to test.
        Returns:
        true if this point is right of the edge.
      • isLeftOf

        public boolean isLeftOf​(QuadEdge e)
        Is this point to the left of the supplied Edge.
        Parameters:
        e - The edge to test.
        Returns:
        true if this point is left of the edge.
      • isInCircle

        public boolean isInCircle​(TriangulationPoint p1,
                                  TriangulationPoint p2,
                                  TriangulationPoint p3)
        Tests whether this point is inside the circumcircle of the other three points.
        Parameters:
        p1 - A point in the circle
        p2 - A point in the circle
        p3 - A point in the circle.
        Returns:
        true if this point lies incide the circumcircle of the other three points.
      • getX

        public double getX()
        Returns:
        Returns the x.
      • setX

        public void setX​(int x)
        Parameters:
        x - The x to set.
      • getY

        public double getY()
        Returns:
        Returns the y.
      • setY

        public void setY​(int y)
        Parameters:
        y - The y to set.