summaryrefslogtreecommitdiffstats
path: root/src/classes/share/com/sun/j3d/internal
diff options
context:
space:
mode:
Diffstat (limited to 'src/classes/share/com/sun/j3d/internal')
-rwxr-xr-xsrc/classes/share/com/sun/j3d/internal/ByteBufferWrapper.java18
-rw-r--r--src/classes/share/com/sun/j3d/internal/Distance.java50
-rwxr-xr-xsrc/classes/share/com/sun/j3d/internal/FloatBufferWrapper.java2
3 files changed, 35 insertions, 35 deletions
diff --git a/src/classes/share/com/sun/j3d/internal/ByteBufferWrapper.java b/src/classes/share/com/sun/j3d/internal/ByteBufferWrapper.java
index fe6ce6f..e673ae7 100755
--- a/src/classes/share/com/sun/j3d/internal/ByteBufferWrapper.java
+++ b/src/classes/share/com/sun/j3d/internal/ByteBufferWrapper.java
@@ -64,7 +64,7 @@ public class ByteBufferWrapper extends BufferWrapper {
private ByteBuffer buffer = null;
/**
- * Constructor initializes buffer with a
+ * Constructor initializes buffer with a
* java.nio.ByteBuffer object.
*/
public ByteBufferWrapper(ByteBuffer buffer) {
@@ -81,7 +81,7 @@ public class ByteBufferWrapper extends BufferWrapper {
/**
* Allocate a direct ByteBuffer with the given capacity.
- * @return New ByteBufferWrapper containing the
+ * @return New ByteBufferWrapper containing the
* new buffer.
*/
public static ByteBufferWrapper allocateDirect(int capacity) {
@@ -110,7 +110,7 @@ public class ByteBufferWrapper extends BufferWrapper {
/**
* Reads the byte at this buffer's current position,
- * and then increments the position.
+ * and then increments the position.
*/
public byte get() {
return buffer.get();
@@ -123,7 +123,7 @@ public class ByteBufferWrapper extends BufferWrapper {
return buffer.get(index);
}
- /**
+ /**
* Bulk <i>get</i> method. Transfers <code>dst.length</code>
* bytes from
* the buffer to the destination array and increments the
@@ -133,9 +133,9 @@ public class ByteBufferWrapper extends BufferWrapper {
buffer.get(dst);
return this;
}
-
+
/**
- * Bulk <i>get</i> method. Transfers <i>length</i> bytes
+ * Bulk <i>get</i> method. Transfers <i>length</i> bytes
* from the buffer starting at position <i>offset</i> into
* the destination array.
*/
@@ -153,7 +153,7 @@ public class ByteBufferWrapper extends BufferWrapper {
}
/**
- * Modifies this buffer's byte order.
+ * Modifies this buffer's byte order.
*/
public ByteBufferWrapper order(ByteOrderWrapper bo)
{
@@ -162,7 +162,7 @@ public class ByteBufferWrapper extends BufferWrapper {
return this;
}
- /**
+ /**
* Creates a view of this ByteBufferWrapper as a
* FloatBufferWrapper. Uses the correct
*/
@@ -170,7 +170,7 @@ public class ByteBufferWrapper extends BufferWrapper {
return new FloatBufferWrapper( buffer.asFloatBuffer() );
}
- /**
+ /**
* Creates a view of this ByteBufferWrapper as a
* DoubleBufferWrapper.
*/
diff --git a/src/classes/share/com/sun/j3d/internal/Distance.java b/src/classes/share/com/sun/j3d/internal/Distance.java
index 9365147..4f232e3 100644
--- a/src/classes/share/com/sun/j3d/internal/Distance.java
+++ b/src/classes/share/com/sun/j3d/internal/Distance.java
@@ -86,9 +86,9 @@ public class Distance {
* @param segend Segment end point
* @return the square of the minimum distance from the ray to the segment
*/
- static public double rayToSegment (Point3d rayorig,
+ static public double rayToSegment (Point3d rayorig,
Vector3d raydir,
- Point3d segstart,
+ Point3d segstart,
Point3d segend) {
return rayToSegment (rayorig, raydir, segstart, segend, null, null, null);
}
@@ -119,9 +119,9 @@ public class Distance {
* @return the square of the minimum distance from the ray to the
* segment
*/
- static public double rayToSegment (Point3d rayorig,
+ static public double rayToSegment (Point3d rayorig,
Vector3d raydir,
- Point3d segstart,
+ Point3d segstart,
Point3d segend,
Point3d rayint,
Point3d segint,
@@ -165,7 +165,7 @@ public class Distance {
return DIST(s*(A*s+B*t+2*D)+t*(B*s+C*t+2*E)+F);
}
else { // region 1
-
+
t = 1;
if (D >= 0) {
s = 0;
@@ -347,11 +347,11 @@ public class Distance {
* @param ray0dir Direction of ray 0
* @param ray1orig Origin of ray 1
* @param ray1dir Direction of ray 1
- * @return the square of the minimum distance from the ray to the segment
+ * @return the square of the minimum distance from the ray to the segment
*/
- static public double rayToRay (Point3d ray0orig,
+ static public double rayToRay (Point3d ray0orig,
Vector3d ray0dir,
- Point3d ray1orig,
+ Point3d ray1orig,
Vector3d ray1dir) {
return rayToRay (ray0orig, ray0dir, ray1orig, ray1dir, null, null, null);
}
@@ -381,9 +381,9 @@ public class Distance {
*
* @return the square of the minimum distance from the ray to the segment
*/
- static public double rayToRay (Point3d ray0orig,
+ static public double rayToRay (Point3d ray0orig,
Vector3d ray0dir,
- Point3d ray1orig,
+ Point3d ray1orig,
Vector3d ray1dir,
Point3d ray0int,
Point3d ray1int,
@@ -538,8 +538,8 @@ public class Distance {
* @param raydir Direction of the ray
* @return the square of the minimum distance between the point and the ray
*/
- static public double pointToRay (Point3d pt,
- Point3d rayorig,
+ static public double pointToRay (Point3d pt,
+ Point3d rayorig,
Vector3d raydir) {
return pointToRay (pt, rayorig, raydir, null, null);
}
@@ -563,8 +563,8 @@ public class Distance {
*
* @return the square of the minimum distance between the point and the ray
*/
- static public double pointToRay (Point3d pt,
- Point3d rayorig,
+ static public double pointToRay (Point3d pt,
+ Point3d rayorig,
Vector3d raydir,
Point3d rayint,
double[] param) {
@@ -591,8 +591,8 @@ public class Distance {
/**
* Minimum pt to segment distance. Returns the square of the distance.
*/
- static public double pointToSegment (Point3d pt,
- Point3d segstart,
+ static public double pointToSegment (Point3d pt,
+ Point3d segstart,
Point3d segend) {
return pointToSegment (pt, segstart, segend, null, null);
}
@@ -600,8 +600,8 @@ public class Distance {
/**
* Minimum pt to segment distance. Returns the square of the distance.
*/
- static public double pointToSegment (Point3d pt,
- Point3d segstart,
+ static public double pointToSegment (Point3d pt,
+ Point3d segstart,
Point3d segend,
Point3d segint,
double[] param) {
@@ -617,7 +617,7 @@ public class Distance {
t = 0.0f;
if (segint != null) segint.set (segstart);
if (param != null) { param[0] = t; }
- }
+ }
else {
double mDotm = segdir.dot (segdir); //Dot(seg.m,seg.m);
if (t >= mDotm) {
@@ -643,13 +643,13 @@ public class Distance {
* @param seg0end the end of segment 0
* @param seg1start the start of segment 1
* @param seg1end the end of segment 1
- * @return the square of the minimum distance from segment to segment
+ * @return the square of the minimum distance from segment to segment
*/
static public double segmentToSegment (Point3d seg0start,
Point3d seg0end,
- Point3d seg1start,
+ Point3d seg1start,
Point3d seg1end) {
- return segmentToSegment (seg0start, seg0end, seg1start, seg1end,
+ return segmentToSegment (seg0start, seg0end, seg1start, seg1end,
null, null, null);
}
@@ -680,7 +680,7 @@ public class Distance {
*/
static public double segmentToSegment (Point3d seg0start,
Point3d seg0end,
- Point3d seg1start,
+ Point3d seg1start,
Point3d seg1end,
Point3d seg0int,
Point3d seg1int,
@@ -689,7 +689,7 @@ public class Distance {
Vector3d diff = new Vector3d();
diff.sub (seg0start,seg1start);
-
+
Vector3d seg0dir = new Vector3d();
seg0dir.sub (seg0end, seg0start);
Vector3d seg1dir = new Vector3d();
@@ -710,7 +710,7 @@ public class Distance {
E = -seg1dir.dot (diff); //-Dot(seg1dir,diff);
s = B*E-C*D;
t = B*D-A*E;
-
+
if (s >= 0) {
if (s <= det) {
if (t >= 0) {
diff --git a/src/classes/share/com/sun/j3d/internal/FloatBufferWrapper.java b/src/classes/share/com/sun/j3d/internal/FloatBufferWrapper.java
index fc83313..0947a53 100755
--- a/src/classes/share/com/sun/j3d/internal/FloatBufferWrapper.java
+++ b/src/classes/share/com/sun/j3d/internal/FloatBufferWrapper.java
@@ -130,7 +130,7 @@ public class FloatBufferWrapper extends BufferWrapper {
*/
public FloatBufferWrapper get(float[] dst, int offset, int length){
buffer.get(dst, offset, length);
- return this;
+ return this;
}
/**