From 5ea211cde39be9669d1f2f289abbba460398f82e Mon Sep 17 00:00:00 2001 From: Rami Santina Date: Sat, 21 May 2011 17:49:08 +0300 Subject: Remove implicit for loops reduces temp objects --- src/jogl/classes/com/jogamp/graph/curve/OutlineShape.java | 3 ++- src/jogl/classes/com/jogamp/graph/curve/opengl/GLRegion.java | 6 ++++-- src/jogl/classes/com/jogamp/graph/curve/tess/CDTriangulator2D.java | 1 - 3 files changed, 6 insertions(+), 4 deletions(-) (limited to 'src/jogl/classes/com') diff --git a/src/jogl/classes/com/jogamp/graph/curve/OutlineShape.java b/src/jogl/classes/com/jogamp/graph/curve/OutlineShape.java index 7f8e386a1..5b94d6bda 100755 --- a/src/jogl/classes/com/jogamp/graph/curve/OutlineShape.java +++ b/src/jogl/classes/com/jogamp/graph/curve/OutlineShape.java @@ -394,7 +394,8 @@ public class OutlineShape implements Comparable { int maxVertexId = 0; for(int i=0; i vertices = outlines.get(i).getVertices(); - for(Vertex vert:vertices){ + for(int pos=0; pos triangles = outlineShape.triangulate(); region.addTriangles(triangles); ArrayList vertices = outlineShape.getVertices(); - for(Vertex vert:vertices){ + for(int pos=0; pos < vertices.size(); pos++){ + Vertex vert = vertices.get(pos); vert.setId(numVertices++); } region.addVertices(vertices); 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 9de295616..fce2e1bae 100644 --- a/src/jogl/classes/com/jogamp/graph/curve/tess/CDTriangulator2D.java +++ b/src/jogl/classes/com/jogamp/graph/curve/tess/CDTriangulator2D.java @@ -83,7 +83,6 @@ public class CDTriangulator2D { // FIXME: multiple in/out and CW/CCW tests (as follows) ?? if(!loops.isEmpty()) { - // FIXME: #1 in/out test loop = getContainerLoop(polyline); } -- cgit v1.2.3