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 Details

    • getConvexHull

      public static @NonNull List<javafx.geometry.Point2D> getConvexHull(@NonNull 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(@NonNull 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(@NonNull javafx.geometry.Point2D p1, @NonNull javafx.geometry.Point2D p2, @NonNull 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.