public class OverTriangulator extends java.lang.Object implements Triangulator
Constructor and Description |
---|
OverTriangulator(Triangulator tris)
Create a new triangulator
|
Modifier and Type | Method and Description |
---|---|
void |
addPolyPoint(float x,
float y)
Add a point that forms part of the outer 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()
Run the triangulation
|
public OverTriangulator(Triangulator tris)
tris
- The original set of triangles to be sub-dividiedpublic void addPolyPoint(float x, float y)
Triangulator
addPolyPoint
in interface Triangulator
x
- The x coordinate of the pointy
- The y coordiante of the pointpublic int getTriangleCount()
Triangulator
getTriangleCount
in interface Triangulator
public float[] getTrianglePoint(int tri, int i)
Triangulator
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
public boolean triangulate()
Triangulator
triangulate
in interface Triangulator