From 630a9ea52b16da6badb31a98b70893f8d294b4e8 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Wed, 30 Mar 2011 15:25:18 +0200 Subject: Remove generics notion of Type, since Vertex _is_ the lowest denominator for our implementation and curve API --- src/com/jogamp/graph/curve/OutlineShape.java | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) (limited to 'src/com/jogamp/graph/curve/OutlineShape.java') diff --git a/src/com/jogamp/graph/curve/OutlineShape.java b/src/com/jogamp/graph/curve/OutlineShape.java index 9373808f1..2a6e3745f 100755 --- a/src/com/jogamp/graph/curve/OutlineShape.java +++ b/src/com/jogamp/graph/curve/OutlineShape.java @@ -52,13 +52,13 @@ import com.jogamp.graph.curve.tess.CDTriangulator2D; public class OutlineShape { public static final int QUADRATIC_NURBS = 10; private final Vertex.Factory pointFactory; - private ArrayList> outlines = new ArrayList>(3); + private ArrayList outlines = new ArrayList(3); /** Create a new Outline based Shape */ public OutlineShape(Vertex.Factory factory) { pointFactory = factory; - outlines.add(new Outline()); + outlines.add(new Outline()); } public final Vertex.Factory pointFactory() { return pointFactory; } @@ -68,7 +68,7 @@ public class OutlineShape { * be placed at the end of the outline list. */ public void addEmptyOutline(){ - outlines.add(new Outline()); + outlines.add(new Outline()); } /** Adds an outline to the OutlineShape object @@ -77,7 +77,7 @@ public class OutlineShape { * it will do nothing. * @param outline an Outline object */ - public void addOutline(Outline outline){ + public void addOutline(Outline outline){ if(outline.isEmpty()){ return; } @@ -120,7 +120,7 @@ public class OutlineShape { * of outlines that define the shape * @return the last outline */ - public final Outline getLastOutline(){ + public final Outline getLastOutline(){ return outlines.get(outlines.size()-1); } /** Make sure that the outlines represent @@ -135,13 +135,13 @@ public class OutlineShape { } private void transformOutlinesQuadratic(){ - ArrayList> newOutlines = new ArrayList>(3); + ArrayList newOutlines = new ArrayList(3); /**loop over the outlines and make sure no * adj off-curve vertices */ - for(Outline outline:outlines){ - Outline newOutline = new Outline(); + for(Outline outline:outlines){ + Outline newOutline = new Outline(); ArrayList vertices = outline.getVertices(); int size =vertices.size()-1; @@ -165,7 +165,7 @@ public class OutlineShape { private void generateVertexIds(){ int maxVertexId = 0; - for(Outline outline:outlines){ + for(Outline outline:outlines){ ArrayList vertices = outline.getVertices(); for(Vertex vert:vertices){ vert.setId(maxVertexId); @@ -179,7 +179,7 @@ public class OutlineShape { */ public ArrayList getVertices(){ ArrayList vertices = new ArrayList(); - for(Outline polyline:outlines){ + for(Outline polyline:outlines){ vertices.addAll(polyline.getVertices()); } return vertices; @@ -189,21 +189,21 @@ public class OutlineShape { /** Triangluate the graph object * @param sharpness sharpness of the curved regions default = 0.5 */ - public ArrayList> triangulate(float sharpness){ + public ArrayList triangulate(float sharpness){ if(outlines.size() == 0){ return null; } sortOutlines(); generateVertexIds(); - CDTriangulator2D triangulator2d = new CDTriangulator2D(sharpness); + CDTriangulator2D triangulator2d = new CDTriangulator2D(sharpness); for(int index = 0; index< outlines.size();index++){ - Outline outline = outlines.get(index); + Outline outline = outlines.get(index); triangulator2d.addCurve(outline); } - ArrayList> triangles = triangulator2d.generateTriangulation(); + ArrayList triangles = triangulator2d.generateTriangulation(); triangulator2d.reset(); return triangles; -- cgit v1.2.3