summaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/com/jogamp/graph/curve
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2011-05-11 00:25:37 +0200
committerSven Gothel <[email protected]>2011-05-11 00:25:37 +0200
commitb58d6d6ccf9c622f2377cf6c0c3487a8897aba6d (patch)
tree5f00737915f8e8721643ce67338001feb3ad8bba /src/jogl/classes/com/jogamp/graph/curve
parentf5ec2dd42244282c2a005269ae4674ab78af269a (diff)
Graph: Add comments 'n questions (FIXME?)
Diffstat (limited to 'src/jogl/classes/com/jogamp/graph/curve')
-rw-r--r--src/jogl/classes/com/jogamp/graph/curve/tess/CDTriangulator2D.java23
1 files changed, 15 insertions, 8 deletions
diff --git a/src/jogl/classes/com/jogamp/graph/curve/tess/CDTriangulator2D.java b/src/jogl/classes/com/jogamp/graph/curve/tess/CDTriangulator2D.java
index e0d7d3236..4c1ea3fe6 100644
--- a/src/jogl/classes/com/jogamp/graph/curve/tess/CDTriangulator2D.java
+++ b/src/jogl/classes/com/jogamp/graph/curve/tess/CDTriangulator2D.java
@@ -80,19 +80,25 @@ public class CDTriangulator2D {
public void addCurve(Outline polyline){
Loop loop = null;
- if(!loops.isEmpty()){
+ // FIXME: multiple in/out and CW/CCW tests (as follows) ??
+
+ if(!loops.isEmpty()) {
+ // FIXME: #1 in/out test
loop = getContainerLoop(polyline);
}
if(loop == null) {
+ // Claim: CCW (out)
GraphOutline outline = new GraphOutline(polyline);
+ // FIXME: #2/#3 extract..(CCW) and new Loop(CCW).. does CW/CCW tests
GraphOutline innerPoly = extractBoundaryTriangles(outline, false);
vertices.addAll(polyline.getVertices());
loop = new Loop(innerPoly, VectorUtil.Winding.CCW);
loops.add(loop);
- }
- else {
+ } else {
+ // Claim: CW (in)
GraphOutline outline = new GraphOutline(polyline);
+ // FIXME: #3/#4 extract..(CW) and addContraint..(CW) does CW/CCW tests
GraphOutline innerPoly = extractBoundaryTriangles(outline, true);
vertices.addAll(innerPoly.getVertices());
loop.addConstraintCurve(innerPoly);
@@ -159,12 +165,12 @@ public class CDTriangulator2D {
gv1.setBoundaryContained(true);
gv2.setBoundaryContained(true);
- Triangle t= null;
- boolean holeLike = false;
- if(VectorUtil.ccw(v0,v1,v2)){
+ final Triangle t;
+ final boolean holeLike;
+ if(VectorUtil.ccw(v0,v1,v2)) {
+ holeLike = false;
t = new Triangle(v0, v1, v2);
- }
- else {
+ } else {
holeLike = true;
t = new Triangle(v2, v1, v0);
}
@@ -196,6 +202,7 @@ public class CDTriangulator2D {
private Loop getContainerLoop(Outline polyline){
ArrayList<Vertex> vertices = polyline.getVertices();
+ // FIXME: remove implicit iterator
for(Vertex vert: vertices){
for (Loop loop:loops){
if(loop.checkInside(vert)){