diff options
author | Sven Göthel <[email protected]> | 2024-02-14 00:03:11 +0100 |
---|---|---|
committer | Sven Göthel <[email protected]> | 2024-02-14 00:03:11 +0100 |
commit | d4d4a797ab0e53db59dac1ea915825845861667e (patch) | |
tree | b8557f3c023ac70e05a46aa5767c80e03a5bd54d | |
parent | c0133b46c0dfbd506a0ad11416fae3a09d64ec97 (diff) |
Bug 1501: Graph CDTriangulator2D: Add properties to enforce convex and non-convex treatment to simplify debugging etc
-rw-r--r-- | make/scripts/tests.sh | 2 | ||||
-rw-r--r-- | src/jogl/classes/jogamp/graph/curve/tess/CDTriangulator2D.java | 12 |
2 files changed, 12 insertions, 2 deletions
diff --git a/make/scripts/tests.sh b/make/scripts/tests.sh index 01def3994..87ab490b2 100644 --- a/make/scripts/tests.sh +++ b/make/scripts/tests.sh @@ -342,6 +342,8 @@ function jrun() { #D_ARGS="-Djogl.debug.DebugGL" #D_ARGS="-Djogl.debug.graph.curve -Djogl.debug.graph.curve.Instance -Djogl.debug.GLSLCode" #D_ARGS="-Djogl.debug.GLSLCode -Djogl.debug.graph.curve.triangulation.LINE_AA -Djogl.debug.graph.curve.Triangulation -Djogl.debug.graph.font.Renderer" + #D_ARGS="-Djogl.debug.graph.curve.triangulation.force.non-convex" + #D_ARGS="-Djogl.debug.graph.curve.triangulation.force.convex" #D_ARGS="-Djogl.debug.graph.font.Font" #D_ARGS="-Djogl.debug.graph.font.Font -Djogl.debug.graph.font.Renderer -Djogl.debug.graph.font.Renderer.Code" #D_ARGS="-Djogl.debug.GLSLCode -Djogl.debug.graph.curve.vbaa.resizeLowerBoundary=100" diff --git a/src/jogl/classes/jogamp/graph/curve/tess/CDTriangulator2D.java b/src/jogl/classes/jogamp/graph/curve/tess/CDTriangulator2D.java index d0e0fecf6..08b75478d 100644 --- a/src/jogl/classes/jogamp/graph/curve/tess/CDTriangulator2D.java +++ b/src/jogl/classes/jogamp/graph/curve/tess/CDTriangulator2D.java @@ -50,6 +50,8 @@ public class CDTriangulator2D implements Triangulator { protected static final boolean DEBUG = Debug.debug("graph.curve.Triangulation"); + private static final boolean FORCE_NONCONVEX = Debug.debug("graph.curve.triangulation.force.non-convex"); + private static final boolean FORCE_CONVEX = Debug.debug("graph.curve.triangulation.force.convex"); private static final boolean TEST_LINE_AA = Debug.debug("graph.curve.triangulation.LINE_AA"); private static final boolean TEST_MARK_LINE = Debug.debug("graph.curve.triangulation.MARK_AA"); private static final boolean TEST_ENABLED = TEST_LINE_AA || TEST_MARK_LINE; @@ -64,13 +66,19 @@ public class CDTriangulator2D implements Triangulator { /** Constructor for a new Delaunay triangulator */ public CDTriangulator2D() { - convexFlag = true; + if( FORCE_NONCONVEX ) { + convexFlag = false; + } else { + convexFlag = true; + } reset(); } @Override public void setConvexShape(final boolean convex) { - convexFlag = convex; + if( !FORCE_NONCONVEX && !FORCE_CONVEX ) { + convexFlag = convex; + } } @Override |