public class DelaunayTriangulator extends Object
Constructor and Description |
---|
DelaunayTriangulator() |
Modifier and Type | Method and Description |
---|---|
ShortArray |
computeTriangles(float[] polygon,
boolean sorted) |
ShortArray |
computeTriangles(float[] points,
int offset,
int count,
boolean sorted)
Triangulates the given point cloud to a list of triangle indices that make up the Delaunay triangulation.
|
ShortArray |
computeTriangles(FloatArray points,
boolean sorted) |
void |
trim(ShortArray triangles,
float[] points,
float[] hull,
int offset,
int count)
Removes all triangles with a centroid outside the specified hull, which may be concave.
|
public ShortArray computeTriangles(FloatArray points, boolean sorted)
public ShortArray computeTriangles(float[] polygon, boolean sorted)
public ShortArray computeTriangles(float[] points, int offset, int count, boolean sorted)
points
- x,y pairs describing points. Duplicate points will result in undefined behavior.sorted
- If false, the points will be sorted by the x coordinate, which is required by the triangulation algorithm. If
sorting is done the input array is not modified, the returned indices are for the input array, and count*2
additional working memory is needed.public void trim(ShortArray triangles, float[] points, float[] hull, int offset, int count)
Copyright © 2014. All Rights Reserved.