java.lang.Object
org.jhotdraw8.geom.FXConvexHull
Provides utility methods for computing the convex hull from a set of points.
- Author:
- Werner Randelshofer
-
Method Summary
Modifier and TypeMethodDescriptionstatic 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 booleanisRightTurn(javafx.geometry.Point2D p1, javafx.geometry.Point2D p2, javafx.geometry.Point2D p3) Returns true, if the three given points make a right turn.
-
Method Details
-
getConvexHull
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 pointp2- second pointp3- third point- Returns:
- true if right turn.
-