aboutsummaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/com/jogamp/graph
diff options
context:
space:
mode:
Diffstat (limited to 'src/jogl/classes/com/jogamp/graph')
-rw-r--r--src/jogl/classes/com/jogamp/graph/curve/tess/CDTriangulator2D.java4
-rwxr-xr-xsrc/jogl/classes/com/jogamp/graph/math/VectorUtil.java5
2 files changed, 6 insertions, 3 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 55bdbcd33..e0d7d3236 100644
--- a/src/jogl/classes/com/jogamp/graph/curve/tess/CDTriangulator2D.java
+++ b/src/jogl/classes/com/jogamp/graph/curve/tess/CDTriangulator2D.java
@@ -94,7 +94,7 @@ public class CDTriangulator2D {
else {
GraphOutline outline = new GraphOutline(polyline);
GraphOutline innerPoly = extractBoundaryTriangles(outline, true);
- vertices.addAll(innerPoly.getPoints());
+ vertices.addAll(innerPoly.getVertices());
loop.addConstraintCurve(innerPoly);
}
}
@@ -140,7 +140,7 @@ public class CDTriangulator2D {
return triangles;
}
- private GraphOutline extractBoundaryTriangles(GraphOutline outline, boolean hole){
+ private GraphOutline extractBoundaryTriangles(GraphOutline outline, boolean hole) {
GraphOutline innerOutline = new GraphOutline();
ArrayList<GraphVertex> outVertices = outline.getGraphPoint();
int size = outVertices.size();
diff --git a/src/jogl/classes/com/jogamp/graph/math/VectorUtil.java b/src/jogl/classes/com/jogamp/graph/math/VectorUtil.java
index aae7a8c5c..b91969745 100755
--- a/src/jogl/classes/com/jogamp/graph/math/VectorUtil.java
+++ b/src/jogl/classes/com/jogamp/graph/math/VectorUtil.java
@@ -310,7 +310,7 @@ public class VectorUtil {
/** Computes the area of a list of vertices to check if ccw
* @param vertices
- * @return positve area if ccw else negative area value
+ * @return positive area if ccw else negative area value
*/
public static float area(ArrayList<Vertex> vertices) {
int n = vertices.size();
@@ -323,4 +323,7 @@ public class VectorUtil {
}
return area;
}
+ public static Winding getWinding(ArrayList<Vertex> vertices) {
+ return area(vertices) >= 0 ? Winding.CCW : Winding.CW ;
+ }
}