|
JHotDraw 7.5.1 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.jhotdraw.geom.ConvexHull
public class ConvexHull
Provides utility methods for computing the convex hull from a set of points.
| Constructor Summary | |
|---|---|
ConvexHull()
|
|
| Method Summary | |
|---|---|
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. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ConvexHull()
| Method Detail |
|---|
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 shape
public 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 point
public 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
|
Copyright 1996-2010 (c) by the authors and contributors of the JHotDraw project. Some rights reserved. |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||