public class Polygon
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
DoubleBuffer |
coords |
| Constructor and Description |
|---|
Polygon() |
Polygon(DoubleBuffer buffy) |
Polygon(int size) |
| Modifier and Type | Method and Description |
|---|---|
void |
addVertex(double x,
double y) |
Polygon |
clipToLine(Line clipEdge)
Clips along a single infinite edge.
|
Polygon |
clipToRectangle(double minX,
double minY,
double maxX,
double maxY)
Clips the polygon to the given rectangle.
|
java.lang.Object |
clone() |
static boolean |
containsDegenerateSegments(DoubleBuffer coords) |
Point |
getCentroid() |
Rectangle |
getExtents() |
double |
getLength() |
int |
getVertexCount() |
boolean |
isDegenerate() |
static boolean |
isDegenerate(DoubleBuffer coords) |
boolean |
isInside(double x,
double y) |
void |
reduceDetail(double granularity) |
static void |
reduceDetail(DoubleBuffer coords,
double granularity)
Attempts to reduce the complexity of the line by eliminating points which
add nothing to the detail at a certain granularity.
|
TriangleArray |
tessellate()
Converts the polygon into a set of triangles.
|
void |
tessellate(TriangleArray results)
Converts the polygon into a set of triangles.
|
XyPolygon |
toXyPolygon() |
public DoubleBuffer coords
public Polygon()
public Polygon(int size)
public Polygon(DoubleBuffer buffy)
public java.lang.Object clone()
clone in class java.lang.Objectpublic final void reduceDetail(double granularity)
public static final void reduceDetail(DoubleBuffer coords, double granularity)
public static final boolean isDegenerate(DoubleBuffer coords)
public static final boolean containsDegenerateSegments(DoubleBuffer coords)
public void addVertex(double x,
double y)
public final Point getCentroid()
public final double getLength()
public final Rectangle getExtents()
public boolean isInside(double x,
double y)
public int getVertexCount()
public Polygon clipToRectangle(double minX, double minY, double maxX, double maxY)
public Polygon clipToLine(Line clipEdge)
public final boolean isDegenerate()
public TriangleArray tessellate()
public void tessellate(TriangleArray results)
public XyPolygon toXyPolygon()