Class FXConvexHull

java.lang.Object
org.jhotdraw8.geom.FXConvexHull

public class FXConvexHull extends Object
Provides utility methods for computing the convex hull from a set of points.
Author:
Werner Randelshofer
  • Method Summary

    Modifier and Type
    Method
    Description
    static List<javafx.geometry.Point2D>
    getConvexHull(List<javafx.geometry.Point2D> points)
    Computes the convex hull from a set of points.
    static javafx.geometry.Point2D[]
    getConvexHull(javafx.geometry.Point2D[] points)
    Computes the convex hull from a set of points.
    static boolean
    isRightTurn(javafx.geometry.Point2D p1, javafx.geometry.Point2D p2, javafx.geometry.Point2D p3)
    Returns true, if the three given points make a right turn.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • getConvexHull

      public static List<javafx.geometry.Point2D> getConvexHull(List<javafx.geometry.Point2D> points)
      Computes the convex hull from a set of points.
      Parameters:
      points - the points
      Returns:
      convex hull of the points
    • getConvexHull

      public static javafx.geometry.Point2D[] getConvexHull(javafx.geometry.Point2D[] points)
      Computes the convex hull from a set of points.
      Parameters:
      points - the points
      Returns:
      convex hull of the points
    • isRightTurn

      public static boolean isRightTurn(javafx.geometry.Point2D p1, javafx.geometry.Point2D p2, javafx.geometry.Point2D 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.