If the polygon vertices are very large or very close together then GeometryUtils#isClockwise(float[], int, int) may not
be able to properly assess the winding (because it uses floats). In that case the vertices should be adjusted, eg by finding
the smallest X and Y values and subtracting that from each vertex.
| Modifier and Type | Field and Description |
|---|---|
| private static final int | |
| private static final int | |
| private short[] | |
| private final ShortArray | |
| private final ShortArray | |
| private int | |
| private final IntArray | |
| private float[] |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| private int | |
| private static int | |
| public ShortArray | |
| public ShortArray | |
| public ShortArray | Returns: triples of triangle indices in clockwise order. Note the returned array is reused for later calls to the same method.pairs describing vertices of the polygon, in either clockwise or counterclockwise order. vertices, int offset, int count)Triangulates the given (convex or concave) simple polygon to a list of triangle vertices. |
| private void | |
| private int | |
| private boolean | |
| private int | |
| private int | |
| private void |
| CONCAVE | back to summary |
|---|---|
| private static final int CONCAVE | |
| CONVEX | back to summary |
|---|---|
| private static final int CONVEX | |
| indices | back to summary |
|---|---|
| private short[] indices | |
| indicesArray | back to summary |
|---|---|
| private final ShortArray indicesArray | |
| triangles | back to summary |
|---|---|
| private final ShortArray triangles | |
| vertexCount | back to summary |
|---|---|
| private int vertexCount | |
| vertexTypes | back to summary |
|---|---|
| private final IntArray vertexTypes | |
| vertices | back to summary |
|---|---|
| private float[] vertices | |
| EarClippingTriangulator | back to summary |
|---|---|
| public EarClippingTriangulator() | |
| classifyVertex | back to summary |
|---|---|
| private int classifyVertex(int index) | |
| computeSpannedAreaSign | back to summary |
|---|---|
| private static int computeSpannedAreaSign(float p1x, float p1y, float p2x, float p2y, float p3x, float p3y) | |
| computeTriangles | back to summary |
|---|---|
public ShortArray computeTriangles(FloatArray vertices)
| |
| computeTriangles | back to summary |
|---|---|
public ShortArray computeTriangles(float[] vertices)
| |
| computeTriangles | back to summary |
|---|---|
| public ShortArray computeTriangles(float[] vertices, int offset, int count) Triangulates the given (convex or concave) simple polygon to a list of triangle vertices.
| |
| cutEarTip | back to summary |
|---|---|
| private void cutEarTip(int earTipIndex) | |
| findEarTip | back to summary |
|---|---|
| private int findEarTip() | |
| isEarTip | back to summary |
|---|---|
| private boolean isEarTip(int earTipIndex) | |
| nextIndex | back to summary |
|---|---|
| private int nextIndex(int index) | |
| previousIndex | back to summary |
|---|---|
| private int previousIndex(int index) | |
| triangulate | back to summary |
|---|---|
| private void triangulate() | |