aboutsummaryrefslogtreecommitdiffstats
path: root/src/jogl
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2023-04-14 17:44:51 +0200
committerSven Gothel <[email protected]>2023-04-14 17:44:51 +0200
commit7d4e3a072c4aa8ef3745fa968b3e563064d83e27 (patch)
tree82e471914032d55ff9fb8c9afa44e5a5c6a995d3 /src/jogl
parent3d0f8a7cd720801c6f247c38c95df556a10fff27 (diff)
Graph OutlineShape: Add getOutlineVectexCount(), i.e. total vertex count of all Outlines
Diffstat (limited to 'src/jogl')
-rw-r--r--src/jogl/classes/com/jogamp/graph/curve/OutlineShape.java10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/jogl/classes/com/jogamp/graph/curve/OutlineShape.java b/src/jogl/classes/com/jogamp/graph/curve/OutlineShape.java
index 807d79abe..9b71865f6 100644
--- a/src/jogl/classes/com/jogamp/graph/curve/OutlineShape.java
+++ b/src/jogl/classes/com/jogamp/graph/curve/OutlineShape.java
@@ -236,10 +236,20 @@ public final class OutlineShape implements Comparable<OutlineShape> {
*/
public final Vertex.Factory<? extends Vertex> vertexFactory() { return vertexFactory; }
+ /** Returns the number of {@link Outline}s. */
public final int getOutlineCount() {
return outlines.size();
}
+ /** Returns the total {@link Outline#getVertexCount() vertex number} of all {@link Outline}s. */
+ public final int getOutlineVectexCount() {
+ int res = 0;
+ for(final Outline o : outlines) {
+ res += o.getVertexCount();
+ }
+ return res;
+ }
+
/**
* Compute the {@link Winding} of the {@link #getLastOutline()} using the {@link #area(ArrayList)} function over all of its vertices.
* @return {@link Winding#CCW} or {@link Winding#CW}