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 TypeMethodDescriptiongetConvexHull(@NonNull List<javafx.geometry.Point2D> points) Computes the convex hull from a set of points.static javafx.geometry.Point2D[]getConvexHull(@NonNull javafx.geometry.Point2D[] points) Computes the convex hull from a set of points.static booleanisRightTurn(@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.
-
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
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 pointp2- second pointp3- third point- Returns:
- true if right turn.
-