aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorHarvey Harrison <[email protected]>2013-06-28 14:16:04 -0700
committerHarvey Harrison <[email protected]>2013-06-28 14:16:04 -0700
commit04e6a1b9b47f9a3eaa3573c2cbe4c2cf403f7a28 (patch)
tree12a1211e6431c7de6c51f60a2232f039da7011b8 /src
parentf9978f3d5fd6d8d73dd7b8c1574d36262f32aeb9 (diff)
j3dcore: use the new Utils helpers to remove the last dependency on the Distance class
Signed-off-by: Harvey Harrison <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/classes/share/javax/media/j3d/GeometryArrayRetained.java10
-rw-r--r--src/classes/share/javax/media/j3d/PickConeRay.java6
-rw-r--r--src/classes/share/javax/media/j3d/PickConeSegment.java6
-rw-r--r--src/classes/share/javax/media/j3d/PickCylinderRay.java8
-rw-r--r--src/classes/share/javax/media/j3d/PickCylinderSegment.java10
5 files changed, 15 insertions, 25 deletions
diff --git a/src/classes/share/javax/media/j3d/GeometryArrayRetained.java b/src/classes/share/javax/media/j3d/GeometryArrayRetained.java
index f2f7600..d037c4f 100644
--- a/src/classes/share/javax/media/j3d/GeometryArrayRetained.java
+++ b/src/classes/share/javax/media/j3d/GeometryArrayRetained.java
@@ -50,8 +50,6 @@ import javax.vecmath.TexCoord4f;
import javax.vecmath.Vector3d;
import javax.vecmath.Vector3f;
-import com.sun.j3d.internal.Distance;
-
/**
* The GeometryArray object contains arrays of positional coordinates,
@@ -8189,13 +8187,13 @@ ArrayList<ArrayList<MorphRetained>> morphUserLists = null;
j = (i < coordinates.length-1 ? i+1: 0);
if (cyl instanceof PickCylinderSegment) {
sqDistToEdge =
- Distance.segmentToSegment(origin, end,
+ Utils.segmentToSegment(origin, end,
coordinates[i], coordinates[j],
iPnt1, iPnt, null);
}
else {
sqDistToEdge =
- Distance.rayToSegment(origin, direction,
+ Utils.rayToSegment(origin, direction,
coordinates[i], coordinates[j],
iPnt1, iPnt, null);
}
@@ -8259,13 +8257,13 @@ ArrayList<ArrayList<MorphRetained>> morphUserLists = null;
j = (i < coordinates.length-1 ? i+1: 0);
if (cone instanceof PickConeSegment) {
sqDistToEdge =
- Distance.segmentToSegment (origin, end,
+ Utils.segmentToSegment (origin, end,
coordinates[i], coordinates[j],
iPnt1, iPnt, null);
}
else {
sqDistToEdge =
- Distance.rayToSegment (origin, direction,
+ Utils.rayToSegment (origin, direction,
coordinates[i], coordinates[j],
iPnt1, iPnt, null);
}
diff --git a/src/classes/share/javax/media/j3d/PickConeRay.java b/src/classes/share/javax/media/j3d/PickConeRay.java
index 25fa315..d3f5465 100644
--- a/src/classes/share/javax/media/j3d/PickConeRay.java
+++ b/src/classes/share/javax/media/j3d/PickConeRay.java
@@ -30,8 +30,6 @@ import javax.vecmath.Point3d;
import javax.vecmath.Point4d;
import javax.vecmath.Vector3d;
-import com.sun.j3d.internal.Distance;
-
/**
* PickConeRay is an infinite cone ray pick shape. It can
* be used as an argument to the picking methods in BranchGroup and Locale.
@@ -169,7 +167,7 @@ public final class PickConeRay extends PickCone {
for (int i=0;i<edges.length;i++) {
// System.err.println ("Testing edge: "+edges[i][0]+" - "+edges[i][1]);
double distToEdge =
- Distance.rayToSegment (origin, direction, edges[i][0], edges[i][1],
+ Utils.rayToSegment (origin, direction, edges[i][0], edges[i][1],
rayPt, null, null);
vector.sub (rayPt, origin);
@@ -229,7 +227,7 @@ public final class PickConeRay extends PickCone {
continue;
}
distToEdge =
- Distance.rayToSegment (origin, direction,
+ Utils.rayToSegment (origin, direction,
ptope.verts[i], ptope.verts[j],
rayPt, null, null);
vector.sub (rayPt, origin);
diff --git a/src/classes/share/javax/media/j3d/PickConeSegment.java b/src/classes/share/javax/media/j3d/PickConeSegment.java
index 22aa417..e62b024 100644
--- a/src/classes/share/javax/media/j3d/PickConeSegment.java
+++ b/src/classes/share/javax/media/j3d/PickConeSegment.java
@@ -30,8 +30,6 @@ import javax.vecmath.Point3d;
import javax.vecmath.Point4d;
import javax.vecmath.Vector3d;
-import com.sun.j3d.internal.Distance;
-
/**
* PickConeSegment is a finite cone segment pick shape. It can
* be used as an argument to the picking methods in BranchGroup and Locale.
@@ -192,7 +190,7 @@ public final class PickConeSegment extends PickCone {
for (int i=0;i<edges.length;i++) {
// System.err.println ("Testing edge: "+edges[i][0]+" - "+edges[i][1]);
double distToEdge =
- Distance.segmentToSegment (origin, end, edges[i][0], edges[i][1],
+ Utils.segmentToSegment (origin, end, edges[i][0], edges[i][1],
rayPt, null, null);
vector.sub (rayPt, origin);
@@ -258,7 +256,7 @@ public final class PickConeSegment extends PickCone {
continue;
}
distToEdge =
- Distance.segmentToSegment (origin, end,
+ Utils.segmentToSegment (origin, end,
ptope.verts[i], ptope.verts[j],
rayPt, null, null);
vector.sub (rayPt, origin);
diff --git a/src/classes/share/javax/media/j3d/PickCylinderRay.java b/src/classes/share/javax/media/j3d/PickCylinderRay.java
index 6f69600..0d3c4c2 100644
--- a/src/classes/share/javax/media/j3d/PickCylinderRay.java
+++ b/src/classes/share/javax/media/j3d/PickCylinderRay.java
@@ -30,8 +30,6 @@ import javax.vecmath.Point3d;
import javax.vecmath.Point4d;
import javax.vecmath.Vector3d;
-import com.sun.j3d.internal.Distance;
-
/**
* PickCylinderRay is an infinite cylindrical ray pick shape. It can
* be used as an argument to the picking methods in BranchGroup and Locale.
@@ -158,7 +156,7 @@ public final class PickCylinderRay extends PickCylinder {
for (int i=0;i<edges.length;i++) {
// System.err.println ("Testing edge: "+edges[i][0]+" - "+edges[i][1]);
double distToEdge =
- Distance.rayToSegment (origin, direction, edges[i][0], edges[i][1]);
+ Utils.rayToSegment (origin, direction, edges[i][0], edges[i][1], null, null, null);
if (distToEdge <= radius*radius) {
// System.err.println ("Intersects!");
return true;
@@ -210,8 +208,8 @@ public final class PickCylinderRay extends PickCylinder {
continue;
}
distToEdge =
- Distance.rayToSegment (origin, direction,
- ptope.verts[i], ptope.verts[j]);
+ Utils.rayToSegment (origin, direction,
+ ptope.verts[i], ptope.verts[j], null, null, null);
if (distToEdge <= radius*radius) {
return true;
}
diff --git a/src/classes/share/javax/media/j3d/PickCylinderSegment.java b/src/classes/share/javax/media/j3d/PickCylinderSegment.java
index 70ad3db..2626d07 100644
--- a/src/classes/share/javax/media/j3d/PickCylinderSegment.java
+++ b/src/classes/share/javax/media/j3d/PickCylinderSegment.java
@@ -29,8 +29,6 @@ package javax.media.j3d;
import javax.vecmath.Point3d;
import javax.vecmath.Point4d;
-import com.sun.j3d.internal.Distance;
-
/**
* PickCylinderSegment is a finite cylindrical segment pick shape. It can
* be used as an argument to the picking methods in BranchGroup and Locale.
@@ -177,8 +175,8 @@ public final class PickCylinderSegment extends PickCylinder {
for (int i=0;i<edges.length;i++) {
// System.err.println ("Testing edge: "+edges[i][0]+" - "+edges[i][1]);
double distToEdge =
- Distance.segmentToSegment (origin, end,
- edges[i][0], edges[i][1]);
+ Utils.segmentToSegment (origin, end,
+ edges[i][0], edges[i][1], null, null, null);
if (distToEdge <= radius*radius) {
// System.err.println ("Intersects!");
return true;
@@ -229,8 +227,8 @@ public final class PickCylinderSegment extends PickCylinder {
continue;
}
distToEdge =
- Distance.segmentToSegment (origin, end,
- ptope.verts[i], ptope.verts[j]);
+ Utils.segmentToSegment (origin, end,
+ ptope.verts[i], ptope.verts[j], null, null, null);
if (distToEdge <= radius*radius) {
return true;
}