diff options
Diffstat (limited to 'src/jogl/classes/jogamp/graph/curve/tess')
-rw-r--r-- | src/jogl/classes/jogamp/graph/curve/tess/CDTriangulator2D.java | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/jogl/classes/jogamp/graph/curve/tess/CDTriangulator2D.java b/src/jogl/classes/jogamp/graph/curve/tess/CDTriangulator2D.java index ad01c24fa..d2cfa42a1 100644 --- a/src/jogl/classes/jogamp/graph/curve/tess/CDTriangulator2D.java +++ b/src/jogl/classes/jogamp/graph/curve/tess/CDTriangulator2D.java @@ -54,7 +54,8 @@ public class CDTriangulator2D implements Triangulator { private final ArrayList<Loop> loops = new ArrayList<Loop>(); - private int maxTriID = 0; + private int addedVerticeCount; + private int maxTriID; /** Constructor for a new Delaunay triangulator @@ -66,10 +67,17 @@ public class CDTriangulator2D implements Triangulator { @Override public final void reset() { maxTriID = 0; + addedVerticeCount = 0; loops.clear(); } @Override + public final int getAddedVerticeCount() { + return addedVerticeCount; + } + + + @Override public final void addCurve(final List<Triangle> sink, final Outline polyline, final float sharpness) { Loop loop = null; @@ -164,6 +172,7 @@ public class CDTriangulator2D implements Triangulator { final Vertex v0 = gv0.getPoint().clone(); final Vertex v2 = gv2.getPoint().clone(); final Vertex v1 = gv1.getPoint().clone(); + addedVerticeCount += 3; final boolean[] boundaryVertices = { true, true, true }; gv0.setBoundaryContained(true); |