|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.newdawn.slick.geom.BasicTriangulator
public class BasicTriangulator
Triangulates a polygon into triangles - duh. Doesn't handle holes in polys
Constructor Summary | |
---|---|
BasicTriangulator()
Create a new triangulator |
Method Summary | |
---|---|
void |
addPolyPoint(float x,
float y)
Add a point describing the polygon to be triangulated |
float[] |
getPolyPoint(int index)
Get the coordinates of the point at the specified index |
int |
getPolyPointCount()
Get the number of points in the polygon |
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 |
void |
startHole()
Start a hole in the polygon |
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 BasicTriangulator()
Method Detail |
---|
public void addPolyPoint(float x, float y)
addPolyPoint
in interface Triangulator
x
- The x coordinate of the pointy
- the y coordinate of the pointpublic int getPolyPointCount()
public float[] getPolyPoint(int index)
index
- The index of the point to retrieve
public boolean triangulate()
triangulate
in interface Triangulator
public int getTriangleCount()
getTriangleCount
in interface Triangulator
public float[] getTrianglePoint(int tri, int i)
getTrianglePoint
in interface Triangulator
tri
- The index of the triangle to interegatei
- The index of the point within the triangle to retrieve
(0 - 2)
public void startHole()
Triangulator
startHole
in interface Triangulator
Triangulator.startHole()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |