diff options
author | Sven Gothel <[email protected]> | 2011-03-29 15:05:49 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2011-03-29 15:05:49 +0200 |
commit | 5f0293b84d0146d9e750ea7e75caaa101ae3b3c3 (patch) | |
tree | e95f0c919a0a385cf70ef6846295a83705c0af60 /src/com/jogamp/graph/curve/OutlineShape.java | |
parent | 4ed4dc3847d8d53a3424011f3d56b00ef246a81e (diff) |
Refactoring for public: Remove Line ; public/private API cleanup
Diffstat (limited to 'src/com/jogamp/graph/curve/OutlineShape.java')
-rwxr-xr-x | src/com/jogamp/graph/curve/OutlineShape.java | 28 |
1 files changed, 2 insertions, 26 deletions
diff --git a/src/com/jogamp/graph/curve/OutlineShape.java b/src/com/jogamp/graph/curve/OutlineShape.java index d7b941282..9373808f1 100755 --- a/src/com/jogamp/graph/curve/OutlineShape.java +++ b/src/com/jogamp/graph/curve/OutlineShape.java @@ -30,12 +30,10 @@ package com.jogamp.graph.curve; import java.util.ArrayList;
import java.util.Collections;
-import jogamp.graph.math.VectorFloatUtil;
-
import com.jogamp.graph.geom.Outline;
-import com.jogamp.graph.geom.Line;
import com.jogamp.graph.geom.Triangle;
import com.jogamp.graph.geom.Vertex;
+import com.jogamp.graph.math.VectorUtil;
import com.jogamp.graph.curve.tess.CDTriangulator2D;
@@ -153,7 +151,7 @@ public class OutlineShape { if(!(currentVertex.isOnCurve()) && !(nextVertex.isOnCurve())) {
newOutline.addVertex(currentVertex);
- float[] newCoords = VectorFloatUtil.mid(currentVertex.getCoord(), nextVertex.getCoord());
+ float[] newCoords = VectorUtil.mid(currentVertex.getCoord(), nextVertex.getCoord());
newOutline.addVertex(pointFactory, newCoords, 0, 3, true);
}
else {
@@ -188,28 +186,6 @@ public class OutlineShape { }
- /** Generates the lines the define the noncurved
- * parts of this graph
- * @return arraylist of lines
- */
- public ArrayList<Line<Vertex>> getLines(){
- ArrayList<Line<Vertex>> lines = new ArrayList<Line<Vertex>>();
- for(Outline<Vertex> outline:outlines){
- ArrayList<Vertex> outVertices = outline.getVertices();
- int size = outVertices.size();
- for(int i=0; i < size; i++) {
- Vertex currentVertex = outVertices.get(i);
- if(currentVertex.isOnCurve()) {
- Vertex v2 = outVertices.get((i+1)%size);
- if(v2.isOnCurve()){
- lines.add(new Line<Vertex>(currentVertex, v2));
- }
- }
- }
- }
- return lines;
- }
-
/** Triangluate the graph object
* @param sharpness sharpness of the curved regions default = 0.5
*/
|