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 /src/jogl/classes | |
parent | c0133b46c0dfbd506a0ad11416fae3a09d64ec97 (diff) |
Bug 1501: Graph CDTriangulator2D: Add properties to enforce convex and non-convex treatment to simplify debugging etc
Diffstat (limited to 'src/jogl/classes')
-rw-r--r-- | src/jogl/classes/jogamp/graph/curve/tess/CDTriangulator2D.java | 12 |
1 files changed, 10 insertions, 2 deletions
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 |