GeometryBuffer: add removeLastPoint (#702)

This commit is contained in:
Gustl22
2019-03-19 14:40:45 +01:00
committed by Emux
parent 4e37ae26c9
commit fb8e6dab20
5 changed files with 48 additions and 18 deletions

View File

@@ -468,6 +468,16 @@ public class GeometryBuffer {
return GeometryUtils.isClockwise(points, index[0]);
}
/**
* Remove the last point.
*/
public void removeLastPoint() {
if (!isTris()) {
pointNextPos -= 2;
index[indexCurrentPos] -= 2;
}
}
/**
* Reverse the order of points for lines and polygons.
*/