public class NeatTriangulator extends java.lang.Object implements Triangulator
| Constructor and Description |
|---|
NeatTriangulator()
Create a new triangulator
|
| Modifier and Type | Method and Description |
|---|---|
void |
addPolyPoint(float x,
float y)
Add a point to the polygon
|
void |
basicTriangulation()
Perform simple triangulation
|
void |
clear()
Clear the triangulator status
|
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()
Upate the triangles
|
public void clear()
public void basicTriangulation()
throws org.cell2d.celick.geom.NeatTriangulator.InternalException
InternalException - Indicates a polygon that can't be triangulatedorg.cell2d.celick.geom.NeatTriangulator.InternalExceptionpublic boolean triangulate()
triangulate in interface Triangulatorpublic void addPolyPoint(float x,
float y)
addPolyPoint in interface Triangulatorx - The x coordinate of the pointy - The y coordiante of the pointpublic int getTriangleCount()
TriangulatorgetTriangleCount in interface Triangulatorpublic float[] getTrianglePoint(int tri,
int i)
TriangulatorgetTrianglePoint in interface Triangulatortri - The index of the triangle to interegatei - The index of the point within the triangle to retrieve
(0 - 2)public void startHole()
TriangulatorstartHole in interface Triangulator