|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.partnersoft.geometry.Polygon
public class Polygon
A single, DoubleBuffer-based polygon.
| Field Summary | |
|---|---|
DoubleBuffer |
coords
|
| Constructor Summary | |
|---|---|
Polygon()
|
|
Polygon(DoubleBuffer buffy)
|
|
Polygon(int size)
|
|
| Method Summary | |
|---|---|
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. |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public DoubleBuffer coords
| Constructor Detail |
|---|
public Polygon()
public Polygon(int size)
public Polygon(DoubleBuffer buffy)
| Method Detail |
|---|
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)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||