public class ConvexHull
extends java.lang.Object
Constructor and Description |
---|
ConvexHull() |
Modifier and Type | Method and Description |
---|---|
static java.util.List<java.awt.Point> |
getConvexHull(java.util.List<java.awt.Point> points)
Computes the convex hull from a set of points.
|
static java.awt.Point[] |
getConvexHull(java.awt.Point[] points)
Computes the convex hull from a set of points.
|
static java.util.List<java.awt.geom.Point2D.Double> |
getConvexHull2D(java.util.List<java.awt.geom.Point2D.Double> points)
Computes the convex hull from a set of points.
|
static java.awt.geom.Point2D.Double[] |
getConvexHull2D(java.awt.geom.Point2D.Double[] points)
Computes the convex hull from a set of points.
|
static Polygon2D.Double |
getConvexHullPath2D(java.util.List<java.awt.geom.Point2D.Double> points)
Computes the convex hull from a set of points.
|
static Polygon2D.Double |
getConvexHullPath2D(java.awt.Shape shape)
Computes the convex hull from a shape.
|
static java.awt.Polygon |
getConvexHullPolygon(java.util.List<java.awt.Point> points)
Computes the convex hull from a set of points.
|
static boolean |
isRightTurn(java.awt.Point p1,
java.awt.Point p2,
java.awt.Point p3)
Returns true, if the three given points make a right turn.
|
static boolean |
isRightTurn2D(java.awt.geom.Point2D.Double p1,
java.awt.geom.Point2D.Double p2,
java.awt.geom.Point2D.Double p3)
Returns true, if the three given points make a right turn.
|
public static java.awt.Polygon getConvexHullPolygon(java.util.List<java.awt.Point> points)
points
- public static Polygon2D.Double getConvexHullPath2D(java.util.List<java.awt.geom.Point2D.Double> points)
points
- public static Polygon2D.Double getConvexHullPath2D(java.awt.Shape shape)
shape
- an arbitray shapepublic static java.util.List<java.awt.Point> getConvexHull(java.util.List<java.awt.Point> points)
points
- public static java.util.List<java.awt.geom.Point2D.Double> getConvexHull2D(java.util.List<java.awt.geom.Point2D.Double> points)
points
- public static java.awt.Point[] getConvexHull(java.awt.Point[] points)
points
- public static boolean isRightTurn(java.awt.Point p1, java.awt.Point p2, java.awt.Point p3)
p1
- first pointp2
- second pointp3
- third pointpublic static java.awt.geom.Point2D.Double[] getConvexHull2D(java.awt.geom.Point2D.Double[] points)
points
- public static boolean isRightTurn2D(java.awt.geom.Point2D.Double p1, java.awt.geom.Point2D.Double p2, java.awt.geom.Point2D.Double p3)
p1
- first pointp2
- second pointp3
- third point