Method | Description | |
---|---|---|
collinearSimplify ( Vertices vertices, float collinearityTolerance ) : Vertices |
Removes all collinear points on the polygon.
|
|
douglasPeuckerSimplify ( Vertices vertices, float distanceTolerance ) : Vertices |
Ramer-Douglas-Peucker polygon simplification algorithm. This is the general recursive version that does not use the speed-up technique by using the Melkman convex hull. If you pass in 0, it will remove all collinear points.
|
|
mergeIdenticalPoints ( Vertices vertices ) : Vertices |
Merges the identical points in the polygon.
|
|
mergeParallelEdges ( Vertices vertices, float tolerance ) : Vertices |
Merges all parallel edges in the list of vertices
|
|
reduceByArea ( Vertices vertices, float areaTolerance ) : Vertices |
Simplify the polygon by removing all points that in pairs of 3 have an area less than the tolerance. Pass in 0 as tolerance, and it will only remove collinear points.
|
|
reduceByDistance ( Vertices vertices, float distance ) : Vertices |
Reduces the polygon by distance.
|
|
reduceByNth ( Vertices vertices, int nth ) : Vertices |
Reduces the polygon by removing the Nth vertex in the vertices list.
|
Method | Description | |
---|---|---|
simplifySection ( Vertices vertices, int i, int j, bool usePoint, float distanceTolerance ) : void |
public static collinearSimplify ( Vertices vertices, float collinearityTolerance ) : Vertices | ||
vertices | Vertices | The polygon that needs simplification. |
collinearityTolerance | float | The collinearity tolerance. |
return | Vertices |
public static douglasPeuckerSimplify ( Vertices vertices, float distanceTolerance ) : Vertices | ||
vertices | Vertices | |
distanceTolerance | float | |
return | Vertices |
public static mergeIdenticalPoints ( Vertices vertices ) : Vertices | ||
vertices | Vertices | The vertices. |
return | Vertices |
public static mergeParallelEdges ( Vertices vertices, float tolerance ) : Vertices | ||
vertices | Vertices | The vertices. |
tolerance | float | The tolerance. |
return | Vertices |
public static reduceByArea ( Vertices vertices, float areaTolerance ) : Vertices | ||
vertices | Vertices | |
areaTolerance | float | |
return | Vertices |
public static reduceByDistance ( Vertices vertices, float distance ) : Vertices | ||
vertices | Vertices | The vertices. |
distance | float | The distance between points. Points closer than this will be removed. |
return | Vertices |
public static reduceByNth ( Vertices vertices, int nth ) : Vertices | ||
vertices | Vertices | The vertices. |
nth | int | The Nth point to remove. Example: 5. |
return | Vertices |