|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.util.AbstractCollection<E> java.util.AbstractList<E> java.util.ArrayList<Point> ProGAL.geom2d.Polygon ProGAL.geom2d.ConvexPolygon
public class ConvexPolygon
Nested Class Summary | |
---|---|
static class |
ConvexPolygon.ConvexHullAlgorithm
|
Constructor Summary | |
---|---|
ConvexPolygon()
|
|
ConvexPolygon(Point p0,
Point p1,
Point p2)
creates a convex polygon with given three points as corners (counterclockwise) |
|
ConvexPolygon(PointSet points,
ConvexPolygon.ConvexHullAlgorithm algorithm)
creates a convex hull of a set of points Jarvis March O(hn) Grahams Scan O(nlogn) |
|
ConvexPolygon(Polygon pol)
creates a convex hull of a simple polygon in O(n) time |
Method Summary | |
---|---|
double[][] |
beamDetector()
|
boolean |
contains(Point p)
returns true if point p is inside the convex polygon |
int |
farthestVertex(int p,
int r)
|
LineSegment |
getDiameter()
returns the segment between most distant pair of points. |
static void |
main(java.lang.String[] args)
|
Methods inherited from class ProGAL.geom2d.Polygon |
---|
deleteLast, draw, draw, getCenter, getConvexPolygon, getCorner, insertAfter, isConvex, leftExtremePointIndx, rightExtremePointIndx, setCorner, shift |
Methods inherited from class java.util.ArrayList |
---|
add, add, addAll, addAll, clear, clone, contains, ensureCapacity, get, indexOf, isEmpty, lastIndexOf, remove, remove, set, size, toArray, toArray, trimToSize |
Methods inherited from class java.util.AbstractList |
---|
equals, hashCode, iterator, listIterator, listIterator, subList |
Methods inherited from class java.util.AbstractCollection |
---|
containsAll, removeAll, retainAll, toString |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface java.util.List |
---|
containsAll, equals, hashCode, iterator, listIterator, listIterator, removeAll, retainAll, subList |
Constructor Detail |
---|
public ConvexPolygon()
public ConvexPolygon(Polygon pol)
public ConvexPolygon(Point p0, Point p1, Point p2)
public ConvexPolygon(PointSet points, ConvexPolygon.ConvexHullAlgorithm algorithm)
Method Detail |
---|
public boolean contains(Point p)
public LineSegment getDiameter()
public double[][] beamDetector()
public int farthestVertex(int p, int r)
public static void main(java.lang.String[] args)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |