aboutsummaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/jogamp/graph/curve
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2014-03-15 16:54:34 +0100
committerSven Gothel <[email protected]>2014-03-15 16:54:34 +0100
commit101567f5f16d91a13c8067764d5e14eefb2b9936 (patch)
treedd53040810d4728182962a6a6dc6ae96427741cf /src/jogl/classes/jogamp/graph/curve
parent06fbb390d28bc247945931699e1d59bdd76230c6 (diff)
FloatUtil/VectorUtil: Enhance isEqual/compare w/ and w/o epsilon, add unit tests - Cleanup VectorUtil (vec2/3 naming, remove dedundant functions)
Diffstat (limited to 'src/jogl/classes/jogamp/graph/curve')
-rw-r--r--src/jogl/classes/jogamp/graph/curve/tess/Loop.java16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/jogl/classes/jogamp/graph/curve/tess/Loop.java b/src/jogl/classes/jogamp/graph/curve/tess/Loop.java
index 5810e3bc9..f96726e5b 100644
--- a/src/jogl/classes/jogamp/graph/curve/tess/Loop.java
+++ b/src/jogl/classes/jogamp/graph/curve/tess/Loop.java
@@ -192,20 +192,20 @@ public class Loop {
float minDistance = Float.MAX_VALUE;
boolean inValid = false;
- ArrayList<GraphVertex> initVertices = initialOutline.getGraphPoint();
- ArrayList<GraphVertex> vertices = polyline.getGraphPoint();
+ final ArrayList<GraphVertex> initVertices = initialOutline.getGraphPoint();
+ final ArrayList<GraphVertex> vertices = polyline.getGraphPoint();
for(int i=0; i< initVertices.size()-1; i++){
- GraphVertex v = initVertices.get(i);
- GraphVertex nextV = initVertices.get(i+1);
+ final GraphVertex v = initVertices.get(i);
+ final GraphVertex nextV = initVertices.get(i+1);
for(int pos=0; pos<vertices.size(); pos++) {
- GraphVertex cand = vertices.get(pos);
- float distance = VectorUtil.computeLength(v.getCoord(), cand.getCoord());
+ final GraphVertex cand = vertices.get(pos);
+ final float distance = VectorUtil.vec3Distance(v.getCoord(), cand.getCoord());
if(distance < minDistance){
for (GraphVertex vert:vertices){
if(vert == v || vert == nextV || vert == cand)
continue;
- inValid = VectorUtil.inCircle(v.getPoint(), nextV.getPoint(),
+ inValid = VectorUtil.isInCircle(v.getPoint(), nextV.getPoint(),
cand.getPoint(), vert.getPoint());
if(inValid){
break;
@@ -249,7 +249,7 @@ public class Loop {
e = e.getNext();
continue;
}
- inValid = VectorUtil.inCircle(root.getGraphPoint().getPoint(), next.getGraphPoint().getPoint(),
+ inValid = VectorUtil.isInCircle(root.getGraphPoint().getPoint(), next.getGraphPoint().getPoint(),
cand, e.getGraphPoint().getPoint());
if(inValid){
break;