|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.phys2d.util.Triangulator
Triangulates a polygon into triangles - duh. Doesn't handle holes in polys
| Constructor Summary | |
Triangulator()
Create a new triangulator |
|
| Method Summary | |
void |
addPolyPoint(float x,
float y)
Add a point describing the polygon to be triangulated |
int |
getTriangleCount()
Get a count of the number of triangles produced |
float[] |
getTrianglePoint(int tri,
int i)
Get a point on a specified generated triangle |
boolean |
triangulate()
Cause the triangulator to split the polygon |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public Triangulator()
| Method Detail |
public void addPolyPoint(float x,
float y)
x - The x coordinate of the pointy - the y coordinate of the pointpublic boolean triangulate()
public int getTriangleCount()
public float[] getTrianglePoint(int tri,
int i)
tri - The index of the triangle to interegatei - The index of the point within the triangle to retrieve
(0 - 2)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||