Whitespace & doc cleanup.

Tabs -> spaces, one space between sentences, capitalization fix, etc.
This commit is contained in:
David Hoover
2012-05-10 22:02:03 -07:00
parent 8bcd5c25c8
commit 0a03eb6849
28 changed files with 64 additions and 64 deletions
+1 -1
View File
@@ -9,7 +9,7 @@
<ant antfile="bootstrap.xml"/>
<import file="${user.home}/.m2/ooo-build/${ooo-build.vers}/ooo-build.xml"/>
to the top level of your build.xml. Then you can depend on -init-ooo in your lowest level
to the top level of your build.xml. Then you can depend on -init-ooo in your lowest level
target to expose ooo-build's maven macros, javac macros, and antcontrib.
-->
@@ -140,7 +140,7 @@ public abstract class AbstractRoundRectangle extends RectangularShape implements
PathIterator.SEG_CUBICTO, PathIterator.SEG_LINETO, PathIterator.SEG_CUBICTO
};
/** The coefficient to calculate control points of Bezier curves. */
/** The coefficient to calculate control points of Bezier curves. */
protected static final double U = 0.5f - 2f / 3f * (Math.sqrt(2f) - 1f);
/** The points coordinates calculation table. */
@@ -299,13 +299,13 @@ public class AffineTransform extends AbstractTransform
@Override // from Transform
public Point inverseTransform (IPoint p, Point into) {
double x = p.x() - tx, y = p.y() - ty;
double det = m00 * m11 - m01 * m10;
double det = m00 * m11 - m01 * m10;
if (Math.abs(det) == 0f) {
// determinant is zero; matrix is not invertible
throw new NoninvertibleTransformException(this.toString());
}
double rdet = 1 / det;
return into.set((x * m11 - y * m10) * rdet,
return into.set((x * m11 - y * m10) * rdet,
(y * m00 - x * m01) * rdet);
}
@@ -324,13 +324,13 @@ public class AffineTransform extends AbstractTransform
@Override // from Transform
public Vector inverseTransform (IVector v, Vector into) {
double x = v.x(), y = v.y();
double det = m00 * m11 - m01 * m10;
double det = m00 * m11 - m01 * m10;
if (Math.abs(det) == 0f) {
// determinant is zero; matrix is not invertible
throw new NoninvertibleTransformException(this.toString());
}
double rdet = 1 / det;
return into.set((x * m11 - y * m10) * rdet,
return into.set((x * m11 - y * m10) * rdet,
(y * m00 - x * m01) * rdet);
}
+7 -7
View File
@@ -250,7 +250,7 @@ public class Box implements IBox, Serializable
// */
// public Box transform (Transform3D transform, Box result) {
// // the corners of the box cover the eight permutations of ([minX|maxX], [minY|maxY],
// // [minZ|maxZ]). to find the new minimum and maximum for each element, we transform
// // [minZ|maxZ]). To find the new minimum and maximum for each element, we transform
// // selecting either the minimum or maximum for each component based on whether it will
// // increase or decrease the total (which depends on the sign of the matrix element).
// transform.update(Transform3D.AFFINE);
@@ -426,7 +426,7 @@ public class Box implements IBox, Serializable
}
/**
* Helper method for {@link #intersects(Ray3)}. Determines whether the ray intersects the box
* Helper method for {@link #intersects(Ray3)}. Determines whether the ray intersects the box
* at the plane where x equals the value specified.
*/
protected boolean intersectsX (IRay3 ray, double x) {
@@ -441,7 +441,7 @@ public class Box implements IBox, Serializable
}
/**
* Helper method for {@link #intersects(Ray3)}. Determines whether the ray intersects the box
* Helper method for {@link #intersects(Ray3)}. Determines whether the ray intersects the box
* at the plane where y equals the value specified.
*/
protected boolean intersectsY (IRay3 ray, double y) {
@@ -456,7 +456,7 @@ public class Box implements IBox, Serializable
}
/**
* Helper method for {@link #intersects(Ray3)}. Determines whether the ray intersects the box
* Helper method for {@link #intersects(Ray3)}. Determines whether the ray intersects the box
* at the plane where z equals the value specified.
*/
protected boolean intersectsZ (IRay3 ray, double z) {
@@ -471,7 +471,7 @@ public class Box implements IBox, Serializable
}
/**
* Helper method for {@link #intersection}. Finds the <code>t</code> value where the ray
* Helper method for {@link #intersection}. Finds the <code>t</code> value where the ray
* intersects the box at the plane where x equals the value specified, or returns
* {@link Float#MAX_VALUE} if there is no such intersection.
*/
@@ -487,7 +487,7 @@ public class Box implements IBox, Serializable
}
/**
* Helper method for {@link #intersection}. Finds the <code>t</code> value where the ray
* Helper method for {@link #intersection}. Finds the <code>t</code> value where the ray
* intersects the box at the plane where y equals the value specified, or returns
* {@link Float#MAX_VALUE} if there is no such intersection.
*/
@@ -503,7 +503,7 @@ public class Box implements IBox, Serializable
}
/**
* Helper method for {@link #intersection}. Finds the <code>t</code> value where the ray
* Helper method for {@link #intersection}. Finds the <code>t</code> value where the ray
* intersects the box at the plane where z equals the value specified, or returns
* {@link Float#MAX_VALUE} if there is no such intersection.
*/
+2 -2
View File
@@ -169,7 +169,7 @@ public class Frustum
// }
/**
* Determines the maximum signed distance of the point from the planes of the frustum. If
* Determines the maximum signed distance of the point from the planes of the frustum. If
* the distance is less than or equal to zero, the point lies inside the frustum.
*/
public double distance (Vector3 point) {
@@ -240,7 +240,7 @@ public class Frustum
/** The vertices of the frustum. */
protected Vector3[] _vertices = new Vector3[8];
/** The planes of the frustum (as derived from the vertices). The plane normals point out of
/** The planes of the frustum (as derived from the vertices). The plane normals point out of
* the frustum. */
protected Plane[] _planes = new Plane[6];
+1 -1
View File
@@ -32,7 +32,7 @@ public interface ILine extends IShape, Cloneable
Point p2 ();
/** Initializes the supplied point with this line's ending point.
* @return the supplied point. */
* @return the supplied point. */
Point p2 (Point target);
/** Returns the square of the distance from the specified point to the line defined by this
+2 -2
View File
@@ -167,7 +167,7 @@ public interface IMatrix4
/**
* Linearly interpolates between this and the specified other matrix (treating the matrices as
* affine);, placing the result in the object provided.
* affine), placing the result in the object provided.
*
* @return a reference to the result object, for chaining.
*/
@@ -282,7 +282,7 @@ public interface IMatrix4
/**
* Returns an approximation of the uniform scale for this matrix (the cube root of the
* signed volume of the parallelepiped spanned by the axis vectors);.
* signed volume of the parallelepiped spanned by the axis vectors).
*/
double approximateUniformScale ();
+2 -2
View File
@@ -33,7 +33,7 @@ public interface IQuaternion
/**
* Computes the angles to pass to {@link #fromAngles} to reproduce this rotation, placing them
* in the provided vector. This uses the factorization method described in David Eberly's
* in the provided vector. This uses the factorization method described in David Eberly's
* <a href="http://www.geometrictools.com/Documentation/EulerAngles.pdf">Euler Angle
* Formulas</a>.
*
@@ -99,7 +99,7 @@ public interface IQuaternion
/**
* Interpolates between this and the specified other quaternion, placing the result in the
* object provided. Based on the code in Nick Bobick's article,
* object provided. Based on the code in Nick Bobick's article,
* <a href="http://www.gamasutra.com/features/19980703/quaternions_01.htm">Rotating Objects
* Using Quaternions</a>.
*
+3 -3
View File
@@ -87,7 +87,7 @@ public class Matrix3 implements IMatrix3, Serializable
}
/**
* Sets this to a rotation matrix. The formula comes from the OpenGL documentation for the
* Sets this to a rotation matrix. The formula comes from the OpenGL documentation for the
* glRotatef function.
*
* @return a reference to this matrix, for chaining.
@@ -101,7 +101,7 @@ public class Matrix3 implements IMatrix3, Serializable
}
/**
* Sets this to a rotation matrix. The formula comes from the
* Sets this to a rotation matrix. The formula comes from the
* <a href="http://www.j3d.org/matrix_faq/matrfaq_latest.html">Matrix and Quaternion FAQ</a>.
*
* @return a reference to this matrix, for chaining.
@@ -471,7 +471,7 @@ public class Matrix3 implements IMatrix3, Serializable
}
/**
* Inverts this matrix and places the result in the given object. This code is based on the
* Inverts this matrix and places the result in the given object. This code is based on the
* examples in the <a href="http://www.j3d.org/matrix_faq/matrfaq_latest.html">Matrix and
* Quaternion FAQ</a>.
*
+5 -5
View File
@@ -190,7 +190,7 @@ public final class Matrix4 implements IMatrix4, Serializable
}
/**
* Sets this to a rotation matrix. The formula comes from the OpenGL documentation for the
* Sets this to a rotation matrix. The formula comes from the OpenGL documentation for the
* glRotatef function.
*
* @return a reference to this matrix, for chaining.
@@ -205,7 +205,7 @@ public final class Matrix4 implements IMatrix4, Serializable
}
/**
* Sets this to a rotation matrix. The formula comes from the
* Sets this to a rotation matrix. The formula comes from the
* <a href="http://www.j3d.org/matrix_faq/matrfaq_latest.html">Matrix and Quaternion FAQ</a>.
*
* @return a reference to this matrix, for chaining.
@@ -339,7 +339,7 @@ public final class Matrix4 implements IMatrix4, Serializable
}
/**
* Sets this to a perspective projection matrix. The formula comes from the OpenGL
* Sets this to a perspective projection matrix. The formula comes from the OpenGL
* documentation for the gluPerspective function.
*
* @return a reference to this matrix, for chaining.
@@ -353,7 +353,7 @@ public final class Matrix4 implements IMatrix4, Serializable
}
/**
* Sets this to a perspective projection matrix. The formula comes from the OpenGL
* Sets this to a perspective projection matrix. The formula comes from the OpenGL
* documentation for the glFrustum function.
*
* @return a reference to this matrix, for chaining.
@@ -383,7 +383,7 @@ public final class Matrix4 implements IMatrix4, Serializable
}
/**
* Sets this to an orthographic projection matrix. The formula comes from the OpenGL
* Sets this to an orthographic projection matrix. The formula comes from the OpenGL
* documentation for the glOrtho function.
*
* @return a reference to this matrix, for chaining.
@@ -207,7 +207,7 @@ public class NonUniformTransform extends AbstractTransform
}
@Override // from Transform
public void transform (IPoint[] src, int srcOff, Point[] dst, int dstOff, int count) {
public void transform (IPoint[] src, int srcOff, Point[] dst, int dstOff, int count) {
double sina = Math.sin(rotation), cosa = Math.cos(rotation);
for (int ii = 0; ii < count; ii++) {
IPoint s = src[srcOff++];
+1 -1
View File
@@ -10,7 +10,7 @@ import java.util.Random;
import pythagoras.util.Platform;
/**
* A unit quaternion. Many of the formulas come from the
* A unit quaternion. Many of the formulas come from the
* <a href="http://www.j3d.org/matrix_faq/matrfaq_latest.html">Matrix and Quaternion FAQ</a>.
*/
public class Quaternion implements IQuaternion, Serializable
+1 -1
View File
@@ -37,7 +37,7 @@ public class Rectangle extends AbstractRectangle implements Serializable
}
/**
* Constructs a rectangle with upper-left corner at (0,) and the supplied dimensions.
* Constructs a rectangle with upper-left corner at (0,0) and the supplied dimensions.
*/
public Rectangle (IDimension d) {
setBounds(0, 0, d.width(), d.height());
@@ -173,7 +173,7 @@ public class UniformTransform extends AbstractTransform
}
@Override // from Transform
public void transform (IPoint[] src, int srcOff, Point[] dst, int dstOff, int count) {
public void transform (IPoint[] src, int srcOff, Point[] dst, int dstOff, int count) {
double sina = Math.sin(rotation), cosa = Math.cos(rotation);
for (int ii = 0; ii < count; ii++) {
IPoint p = src[srcOff++];
@@ -140,7 +140,7 @@ public abstract class AbstractRoundRectangle extends RectangularShape implements
PathIterator.SEG_CUBICTO, PathIterator.SEG_LINETO, PathIterator.SEG_CUBICTO
};
/** The coefficient to calculate control points of Bezier curves. */
/** The coefficient to calculate control points of Bezier curves. */
protected static final float U = 0.5f - 2f / 3f * (FloatMath.sqrt(2f) - 1f);
/** The points coordinates calculation table. */
@@ -299,13 +299,13 @@ public class AffineTransform extends AbstractTransform
@Override // from Transform
public Point inverseTransform (IPoint p, Point into) {
float x = p.x() - tx, y = p.y() - ty;
float det = m00 * m11 - m01 * m10;
float det = m00 * m11 - m01 * m10;
if (Math.abs(det) == 0f) {
// determinant is zero; matrix is not invertible
throw new NoninvertibleTransformException(this.toString());
}
float rdet = 1 / det;
return into.set((x * m11 - y * m10) * rdet,
return into.set((x * m11 - y * m10) * rdet,
(y * m00 - x * m01) * rdet);
}
@@ -324,13 +324,13 @@ public class AffineTransform extends AbstractTransform
@Override // from Transform
public Vector inverseTransform (IVector v, Vector into) {
float x = v.x(), y = v.y();
float det = m00 * m11 - m01 * m10;
float det = m00 * m11 - m01 * m10;
if (Math.abs(det) == 0f) {
// determinant is zero; matrix is not invertible
throw new NoninvertibleTransformException(this.toString());
}
float rdet = 1 / det;
return into.set((x * m11 - y * m10) * rdet,
return into.set((x * m11 - y * m10) * rdet,
(y * m00 - x * m01) * rdet);
}
+7 -7
View File
@@ -250,7 +250,7 @@ public class Box implements IBox, Serializable
// */
// public Box transform (Transform3D transform, Box result) {
// // the corners of the box cover the eight permutations of ([minX|maxX], [minY|maxY],
// // [minZ|maxZ]). to find the new minimum and maximum for each element, we transform
// // [minZ|maxZ]). To find the new minimum and maximum for each element, we transform
// // selecting either the minimum or maximum for each component based on whether it will
// // increase or decrease the total (which depends on the sign of the matrix element).
// transform.update(Transform3D.AFFINE);
@@ -426,7 +426,7 @@ public class Box implements IBox, Serializable
}
/**
* Helper method for {@link #intersects(Ray3)}. Determines whether the ray intersects the box
* Helper method for {@link #intersects(Ray3)}. Determines whether the ray intersects the box
* at the plane where x equals the value specified.
*/
protected boolean intersectsX (IRay3 ray, float x) {
@@ -441,7 +441,7 @@ public class Box implements IBox, Serializable
}
/**
* Helper method for {@link #intersects(Ray3)}. Determines whether the ray intersects the box
* Helper method for {@link #intersects(Ray3)}. Determines whether the ray intersects the box
* at the plane where y equals the value specified.
*/
protected boolean intersectsY (IRay3 ray, float y) {
@@ -456,7 +456,7 @@ public class Box implements IBox, Serializable
}
/**
* Helper method for {@link #intersects(Ray3)}. Determines whether the ray intersects the box
* Helper method for {@link #intersects(Ray3)}. Determines whether the ray intersects the box
* at the plane where z equals the value specified.
*/
protected boolean intersectsZ (IRay3 ray, float z) {
@@ -471,7 +471,7 @@ public class Box implements IBox, Serializable
}
/**
* Helper method for {@link #intersection}. Finds the <code>t</code> value where the ray
* Helper method for {@link #intersection}. Finds the <code>t</code> value where the ray
* intersects the box at the plane where x equals the value specified, or returns
* {@link Float#MAX_VALUE} if there is no such intersection.
*/
@@ -487,7 +487,7 @@ public class Box implements IBox, Serializable
}
/**
* Helper method for {@link #intersection}. Finds the <code>t</code> value where the ray
* Helper method for {@link #intersection}. Finds the <code>t</code> value where the ray
* intersects the box at the plane where y equals the value specified, or returns
* {@link Float#MAX_VALUE} if there is no such intersection.
*/
@@ -503,7 +503,7 @@ public class Box implements IBox, Serializable
}
/**
* Helper method for {@link #intersection}. Finds the <code>t</code> value where the ray
* Helper method for {@link #intersection}. Finds the <code>t</code> value where the ray
* intersects the box at the plane where z equals the value specified, or returns
* {@link Float#MAX_VALUE} if there is no such intersection.
*/
+2 -2
View File
@@ -169,7 +169,7 @@ public class Frustum
// }
/**
* Determines the maximum signed distance of the point from the planes of the frustum. If
* Determines the maximum signed distance of the point from the planes of the frustum. If
* the distance is less than or equal to zero, the point lies inside the frustum.
*/
public float distance (Vector3 point) {
@@ -240,7 +240,7 @@ public class Frustum
/** The vertices of the frustum. */
protected Vector3[] _vertices = new Vector3[8];
/** The planes of the frustum (as derived from the vertices). The plane normals point out of
/** The planes of the frustum (as derived from the vertices). The plane normals point out of
* the frustum. */
protected Plane[] _planes = new Plane[6];
+1 -1
View File
@@ -32,7 +32,7 @@ public interface ILine extends IShape, Cloneable
Point p2 ();
/** Initializes the supplied point with this line's ending point.
* @return the supplied point. */
* @return the supplied point. */
Point p2 (Point target);
/** Returns the square of the distance from the specified point to the line defined by this
+2 -2
View File
@@ -167,7 +167,7 @@ public interface IMatrix4
/**
* Linearly interpolates between this and the specified other matrix (treating the matrices as
* affine);, placing the result in the object provided.
* affine), placing the result in the object provided.
*
* @return a reference to the result object, for chaining.
*/
@@ -282,7 +282,7 @@ public interface IMatrix4
/**
* Returns an approximation of the uniform scale for this matrix (the cube root of the
* signed volume of the parallelepiped spanned by the axis vectors);.
* signed volume of the parallelepiped spanned by the axis vectors).
*/
float approximateUniformScale ();
+2 -2
View File
@@ -33,7 +33,7 @@ public interface IQuaternion
/**
* Computes the angles to pass to {@link #fromAngles} to reproduce this rotation, placing them
* in the provided vector. This uses the factorization method described in David Eberly's
* in the provided vector. This uses the factorization method described in David Eberly's
* <a href="http://www.geometrictools.com/Documentation/EulerAngles.pdf">Euler Angle
* Formulas</a>.
*
@@ -99,7 +99,7 @@ public interface IQuaternion
/**
* Interpolates between this and the specified other quaternion, placing the result in the
* object provided. Based on the code in Nick Bobick's article,
* object provided. Based on the code in Nick Bobick's article,
* <a href="http://www.gamasutra.com/features/19980703/quaternions_01.htm">Rotating Objects
* Using Quaternions</a>.
*
+3 -3
View File
@@ -87,7 +87,7 @@ public class Matrix3 implements IMatrix3, Serializable
}
/**
* Sets this to a rotation matrix. The formula comes from the OpenGL documentation for the
* Sets this to a rotation matrix. The formula comes from the OpenGL documentation for the
* glRotatef function.
*
* @return a reference to this matrix, for chaining.
@@ -101,7 +101,7 @@ public class Matrix3 implements IMatrix3, Serializable
}
/**
* Sets this to a rotation matrix. The formula comes from the
* Sets this to a rotation matrix. The formula comes from the
* <a href="http://www.j3d.org/matrix_faq/matrfaq_latest.html">Matrix and Quaternion FAQ</a>.
*
* @return a reference to this matrix, for chaining.
@@ -471,7 +471,7 @@ public class Matrix3 implements IMatrix3, Serializable
}
/**
* Inverts this matrix and places the result in the given object. This code is based on the
* Inverts this matrix and places the result in the given object. This code is based on the
* examples in the <a href="http://www.j3d.org/matrix_faq/matrfaq_latest.html">Matrix and
* Quaternion FAQ</a>.
*
+5 -5
View File
@@ -190,7 +190,7 @@ public final class Matrix4 implements IMatrix4, Serializable
}
/**
* Sets this to a rotation matrix. The formula comes from the OpenGL documentation for the
* Sets this to a rotation matrix. The formula comes from the OpenGL documentation for the
* glRotatef function.
*
* @return a reference to this matrix, for chaining.
@@ -205,7 +205,7 @@ public final class Matrix4 implements IMatrix4, Serializable
}
/**
* Sets this to a rotation matrix. The formula comes from the
* Sets this to a rotation matrix. The formula comes from the
* <a href="http://www.j3d.org/matrix_faq/matrfaq_latest.html">Matrix and Quaternion FAQ</a>.
*
* @return a reference to this matrix, for chaining.
@@ -339,7 +339,7 @@ public final class Matrix4 implements IMatrix4, Serializable
}
/**
* Sets this to a perspective projection matrix. The formula comes from the OpenGL
* Sets this to a perspective projection matrix. The formula comes from the OpenGL
* documentation for the gluPerspective function.
*
* @return a reference to this matrix, for chaining.
@@ -353,7 +353,7 @@ public final class Matrix4 implements IMatrix4, Serializable
}
/**
* Sets this to a perspective projection matrix. The formula comes from the OpenGL
* Sets this to a perspective projection matrix. The formula comes from the OpenGL
* documentation for the glFrustum function.
*
* @return a reference to this matrix, for chaining.
@@ -383,7 +383,7 @@ public final class Matrix4 implements IMatrix4, Serializable
}
/**
* Sets this to an orthographic projection matrix. The formula comes from the OpenGL
* Sets this to an orthographic projection matrix. The formula comes from the OpenGL
* documentation for the glOrtho function.
*
* @return a reference to this matrix, for chaining.
@@ -207,7 +207,7 @@ public class NonUniformTransform extends AbstractTransform
}
@Override // from Transform
public void transform (IPoint[] src, int srcOff, Point[] dst, int dstOff, int count) {
public void transform (IPoint[] src, int srcOff, Point[] dst, int dstOff, int count) {
float sina = FloatMath.sin(rotation), cosa = FloatMath.cos(rotation);
for (int ii = 0; ii < count; ii++) {
IPoint s = src[srcOff++];
+1 -1
View File
@@ -10,7 +10,7 @@ import java.util.Random;
import pythagoras.util.Platform;
/**
* A unit quaternion. Many of the formulas come from the
* A unit quaternion. Many of the formulas come from the
* <a href="http://www.j3d.org/matrix_faq/matrfaq_latest.html">Matrix and Quaternion FAQ</a>.
*/
public class Quaternion implements IQuaternion, Serializable
+1 -1
View File
@@ -37,7 +37,7 @@ public class Rectangle extends AbstractRectangle implements Serializable
}
/**
* Constructs a rectangle with upper-left corner at (0,) and the supplied dimensions.
* Constructs a rectangle with upper-left corner at (0,0) and the supplied dimensions.
*/
public Rectangle (IDimension d) {
setBounds(0, 0, d.width(), d.height());
@@ -173,7 +173,7 @@ public class UniformTransform extends AbstractTransform
}
@Override // from Transform
public void transform (IPoint[] src, int srcOff, Point[] dst, int dstOff, int count) {
public void transform (IPoint[] src, int srcOff, Point[] dst, int dstOff, int count) {
float sina = FloatMath.sin(rotation), cosa = FloatMath.cos(rotation);
for (int ii = 0; ii < count; ii++) {
IPoint p = src[srcOff++];
+1 -1
View File
@@ -37,7 +37,7 @@ public class Rectangle extends AbstractRectangle implements Serializable
}
/**
* Constructs a rectangle with upper-left corner at (0,) and the supplied dimensions.
* Constructs a rectangle with upper-left corner at (0,0) and the supplied dimensions.
*/
public Rectangle (IDimension d) {
setBounds(0, 0, d.width(), d.height());