Documentation of 'org.jhotdraw.geom.ConvexHull' Java class
ConvexHull
org.jhotdraw.geom

Class ConvexHull



  • public class ConvexHull
    extends java.lang.Object
    Provides utility methods for computing the convex hull from a set of points.
    • Constructor Summary

      Constructors 
      Constructor and Description
      ConvexHull() 
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method and Description
      static java.util.List<java.awt.Point> getConvexHull(java.util.List<java.awt.Point> points)
      Computes the convex hull from a set of points.
      static java.awt.Point[] getConvexHull(java.awt.Point[] points)
      Computes the convex hull from a set of points.
      static java.util.List<java.awt.geom.Point2D.Double> getConvexHull2D(java.util.List<java.awt.geom.Point2D.Double> points)
      Computes the convex hull from a set of points.
      static java.awt.geom.Point2D.Double[] getConvexHull2D(java.awt.geom.Point2D.Double[] points)
      Computes the convex hull from a set of points.
      static Polygon2D.Double getConvexHullPath2D(java.util.List<java.awt.geom.Point2D.Double> points)
      Computes the convex hull from a set of points.
      static Polygon2D.Double getConvexHullPath2D(java.awt.Shape shape)
      Computes the convex hull from a shape.
      static java.awt.Polygon getConvexHullPolygon(java.util.List<java.awt.Point> points)
      Computes the convex hull from a set of points.
      static boolean isRightTurn(java.awt.Point p1, java.awt.Point p2, java.awt.Point p3)
      Returns true, if the three given points make a right turn.
      static boolean isRightTurn2D(java.awt.geom.Point2D.Double p1, java.awt.geom.Point2D.Double p2, java.awt.geom.Point2D.Double p3)
      Returns true, if the three given points make a right turn.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ConvexHull

        public ConvexHull()
    • Method Detail

      • getConvexHullPolygon

        public static java.awt.Polygon getConvexHullPolygon(java.util.List<java.awt.Point> points)
        Computes the convex hull from a set of points.
        Parameters:
        points -
        Returns:
        convex hull of the points as a polygon object.
      • getConvexHullPath2D

        public static Polygon2D.Double getConvexHullPath2D(java.util.List<java.awt.geom.Point2D.Double> points)
        Computes the convex hull from a set of points.
        Parameters:
        points -
        Returns:
        convex hull of the points as a Polygon2D object.
      • getConvexHullPath2D

        public static Polygon2D.Double getConvexHullPath2D(java.awt.Shape shape)
        Computes the convex hull from a shape.
        Parameters:
        shape - an arbitray shape
        Returns:
        convex hull of the points as a Polygon2D object.
      • getConvexHull

        public static java.util.List<java.awt.Point> getConvexHull(java.util.List<java.awt.Point> points)
        Computes the convex hull from a set of points.
        Parameters:
        points -
        Returns:
        convex hull of the points
      • getConvexHull2D

        public static java.util.List<java.awt.geom.Point2D.Double> getConvexHull2D(java.util.List<java.awt.geom.Point2D.Double> points)
        Computes the convex hull from a set of points.
        Parameters:
        points -
        Returns:
        convex hull of the points
      • getConvexHull

        public static java.awt.Point[] getConvexHull(java.awt.Point[] points)
        Computes the convex hull from a set of points.
        Parameters:
        points -
        Returns:
        convex hull of the points
      • isRightTurn

        public static boolean isRightTurn(java.awt.Point p1,
                                          java.awt.Point p2,
                                          java.awt.Point p3)
        Returns true, if the three given points make a right turn.
        Parameters:
        p1 - first point
        p2 - second point
        p3 - third point
        Returns:
        true if right turn.
      • getConvexHull2D

        public static java.awt.geom.Point2D.Double[] getConvexHull2D(java.awt.geom.Point2D.Double[] points)
        Computes the convex hull from a set of points.
        Parameters:
        points -
        Returns:
        convex hull of the points
      • isRightTurn2D

        public static boolean isRightTurn2D(java.awt.geom.Point2D.Double p1,
                                            java.awt.geom.Point2D.Double p2,
                                            java.awt.geom.Point2D.Double p3)
        Returns true, if the three given points make a right turn.
        Parameters:
        p1 - first point
        p2 - second point
        p3 - third point
        Returns:
        true if right turn.

DataMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.