aboutsummaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/jogamp/graph/curve/tess/Loop.java
diff options
context:
space:
mode:
authorSven Göthel <[email protected]>2024-02-14 20:23:24 +0100
committerSven Göthel <[email protected]>2024-02-14 20:23:24 +0100
commite4b49663f6c6f138a8718847b68d1d78fba8fe73 (patch)
tree3628be91f48347a6b26ebf9d7e0809ddae1d4321 /src/jogl/classes/jogamp/graph/curve/tess/Loop.java
parent52277dc625b515ecc3ff0d26ca05428f3d973427 (diff)
Bug 1501: Refine convex == !complex: Use 'complex' term, have env-property toggle OutlineShape's isComplex() for visibility
We may use complex for other criteria than !convex, i.e. self-intersecting etc.
Diffstat (limited to 'src/jogl/classes/jogamp/graph/curve/tess/Loop.java')
-rw-r--r--src/jogl/classes/jogamp/graph/curve/tess/Loop.java14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/jogl/classes/jogamp/graph/curve/tess/Loop.java b/src/jogl/classes/jogamp/graph/curve/tess/Loop.java
index a69fbd6b5..838cf8b5f 100644
--- a/src/jogl/classes/jogamp/graph/curve/tess/Loop.java
+++ b/src/jogl/classes/jogamp/graph/curve/tess/Loop.java
@@ -41,13 +41,13 @@ import com.jogamp.graph.geom.Triangle;
public class Loop {
private final AABBox box = new AABBox();
private final GraphOutline initialOutline;
- private final boolean isConvex;
+ private final boolean complexShape;
private HEdge root;
private final List<GraphOutline> outlines = new ArrayList<GraphOutline>();
- private Loop(final GraphOutline polyline, final int edgeType, final boolean isConvex){
+ private Loop(final GraphOutline polyline, final int edgeType, final boolean complexShape){
this.initialOutline = polyline;
- this.isConvex = isConvex;
+ this.complexShape = complexShape;
this.root = initFromPolyline(initialOutline, edgeType);
}
@@ -249,7 +249,7 @@ public class Loop {
final Vertex rootPoint = root.getGraphPoint().getPoint();
final Vertex nextPoint = next1.getGraphPoint().getPoint();
final Vertex candPoint = next1.getNext().getGraphPoint().getPoint();
- if( !isConvex && intersectsOutline(rootPoint, nextPoint, candPoint) ) {
+ if( complexShape && intersectsOutline(rootPoint, nextPoint, candPoint) ) {
return null;
}
return new Triangle(rootPoint, nextPoint, candPoint, checkVerticesBoundary(root));
@@ -290,7 +290,7 @@ public class Loop {
final Vertex rootPoint = root.getGraphPoint().getPoint();
final Vertex nextPoint = next1.getGraphPoint().getPoint();
final Vertex candPoint = next1.getNext().getGraphPoint().getPoint();
- if( !isConvex && intersectsOutlineDbg(rootPoint, nextPoint, candPoint) ) {
+ if( complexShape && intersectsOutlineDbg(rootPoint, nextPoint, candPoint) ) {
System.err.printf("Loop.cut.X0: last-simplex intersects%n");
return null;
}
@@ -409,7 +409,7 @@ public class Loop {
if( !VectorUtil.isCCW( rootPoint, nextPoint, candPoint) ) {
return null;
}
- if( !isConvex && intersectsOutline(rootPoint, nextPoint, candPoint) ) {
+ if( complexShape && intersectsOutline(rootPoint, nextPoint, candPoint) ) {
return null;
}
if( !delaunay ) {
@@ -440,7 +440,7 @@ public class Loop {
candPoint, rootPoint, nextPoint, candPoint);
return null;
}
- if( !isConvex && intersectsOutlineDbg(rootPoint, nextPoint, candPoint) ) {
+ if( complexShape && intersectsOutlineDbg(rootPoint, nextPoint, candPoint) ) {
return null;
}
if( !delaunay ) {