Package net.runelite.api.model
Class Jarvis
- java.lang.Object
-
- net.runelite.api.model.Jarvis
-
public class Jarvis extends Object
Provides utility methods for computing the convex hull of a list of n points.The implementation uses the Jarvis march algorithm and runs in O(nh) time in the worst case, where n is the number of points and h the number of points on the convex hull.
-
-
Constructor Summary
Constructors Constructor Description Jarvis()
-
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static SimplePolygon
convexHull(int[] xs, int[] ys)
Computes and returns the convex hull of the passed points.static List<Point>
convexHull(List<Point> points)
Deprecated.
-
-
-
Method Detail
-
convexHull
@Deprecated public static List<Point> convexHull(List<Point> points)
Deprecated.Computes and returns the convex hull of the passed points.The size of the list must be at least 3, otherwise this method will return null.
- Parameters:
points
- list of points- Returns:
- list containing the points part of the convex hull
-
convexHull
public static SimplePolygon convexHull(int[] xs, int[] ys)
Computes and returns the convex hull of the passed points.The size of the list must be at least 3, otherwise this method will return null.
- Returns:
- a shape the points part of the convex hull
-
-