aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJulien Gouesse <[email protected]>2019-06-03 23:19:52 +0200
committerJulien Gouesse <[email protected]>2019-06-03 23:19:52 +0200
commit1c96402c2b18751fed8f1a276830b256a4792a3c (patch)
treea837ba77c9094e33b88d2672343d985881f69436
parent2a5157143d9278ed935254ae061a2b1f4235f44f (diff)
Fixes some errors in the Java documentation of ardor3d-math
-rw-r--r--ardor3d-math/src/main/java/com/ardor3d/math/ColorRGBA.java154
-rw-r--r--ardor3d-math/src/main/java/com/ardor3d/math/FastMath.java67
-rw-r--r--ardor3d-math/src/main/java/com/ardor3d/math/Line3.java25
-rw-r--r--ardor3d-math/src/main/java/com/ardor3d/math/Line3Base.java15
-rw-r--r--ardor3d-math/src/main/java/com/ardor3d/math/LineSegment3.java37
-rw-r--r--ardor3d-math/src/main/java/com/ardor3d/math/MathUtils.java203
-rw-r--r--ardor3d-math/src/main/java/com/ardor3d/math/Matrix3.java67
-rw-r--r--ardor3d-math/src/main/java/com/ardor3d/math/Plane.java13
-rw-r--r--ardor3d-math/src/main/java/com/ardor3d/math/Quaternion.java54
-rw-r--r--ardor3d-math/src/main/java/com/ardor3d/math/Vector2.java61
-rw-r--r--ardor3d-math/src/main/java/com/ardor3d/math/Vector3.java9
-rw-r--r--ardor3d-math/src/main/java/com/ardor3d/math/Vector4.java6
-rw-r--r--ardor3d-math/src/main/java/com/ardor3d/math/functions/ArchimedeanSpiralFunction3D.java25
-rw-r--r--ardor3d-math/src/main/java/com/ardor3d/math/functions/BrickGridFunction3D.java12
14 files changed, 524 insertions, 224 deletions
diff --git a/ardor3d-math/src/main/java/com/ardor3d/math/ColorRGBA.java b/ardor3d-math/src/main/java/com/ardor3d/math/ColorRGBA.java
index d61ab4b..df614dd 100644
--- a/ardor3d-math/src/main/java/com/ardor3d/math/ColorRGBA.java
+++ b/ardor3d-math/src/main/java/com/ardor3d/math/ColorRGBA.java
@@ -109,7 +109,8 @@ public class ColorRGBA implements Cloneable, Savable, Externalizable, ReadOnlyCo
/**
* Constructs a new, mutable color set to the (r, g, b, a) values of the provided source color.
*
- * @param src the source color
+ * @param src
+ * the source color
*/
public ColorRGBA(final ReadOnlyColorRGBA src) {
this(src.getRed(), src.getGreen(), src.getBlue(), src.getAlpha());
@@ -118,10 +119,14 @@ public class ColorRGBA implements Cloneable, Savable, Externalizable, ReadOnlyCo
/**
* Constructs a new color set to (r, g, b, a).
*
- * @param r the red component
- * @param g the green component
- * @param b the blue component
- * @param a the alpha component
+ * @param r
+ * the red component
+ * @param g
+ * the green component
+ * @param b
+ * the blue component
+ * @param a
+ * the alpha component
*/
public ColorRGBA(final float r, final float g, final float b, final float a) {
_r = r;
@@ -151,7 +156,8 @@ public class ColorRGBA implements Cloneable, Savable, Externalizable, ReadOnlyCo
}
/**
- * @param index the field index in this color, must be either 0, 1, 2 or 3
+ * @param index
+ * the field index in this color, must be either 0, 1, 2 or 3
* @return r value if index == 0, g value if index == 1, b value if index == 2 or a value if index == 3
* @throws IllegalArgumentException
* if index is not one of 0, 1, 2, 3.
@@ -286,7 +292,8 @@ public class ColorRGBA implements Cloneable, Savable, Externalizable, ReadOnlyCo
/**
* Sets the value of this color to the (r, g, b, a) values of the provided source color.
*
- * @param source the source color
+ * @param source
+ * the source color
* @return this color for chaining
* @throws NullPointerException
* if source is null.
@@ -408,7 +415,8 @@ public class ColorRGBA implements Cloneable, Savable, Externalizable, ReadOnlyCo
* Reads a color, packed into a 4 byte int as 1 byte values in the order ARGB. These byte values are normalized to
* the range [0.0f, 1.0f]
*
- * @param color the 4 byte int as 1 byte values in the order ARGB
+ * @param color
+ * the 4 byte int as 1 byte values in the order ARGB
* @return this color for chaining
*/
public ColorRGBA fromIntARGB(final int color) {
@@ -423,7 +431,8 @@ public class ColorRGBA implements Cloneable, Savable, Externalizable, ReadOnlyCo
* Reads a color, packed into a 4 byte int as 1 byte values in the order RGBA. These byte values are normalized to
* the range [0.0f, 1.0f]
*
- * @param color the 4 byte int as 1 byte values in the order RGBA
+ * @param color
+ * the 4 byte int as 1 byte values in the order RGBA
* @return this color for chaining
*/
public ColorRGBA fromIntRGBA(final int color) {
@@ -466,10 +475,14 @@ public class ColorRGBA implements Cloneable, Savable, Externalizable, ReadOnlyCo
/**
* Adds the given values to those of this color and returns them in store.
*
- * @param r the red component
- * @param g the green component
- * @param b the blue component
- * @param a the alpha component
+ * @param r
+ * the red component
+ * @param g
+ * the green component
+ * @param b
+ * the blue component
+ * @param a
+ * the alpha component
* @param store
* the color to store the result in for return. If null, a new color object is created and returned.
* @return (this.r + r, this.g + g, this.b + b, this.a + a)
@@ -487,10 +500,14 @@ public class ColorRGBA implements Cloneable, Savable, Externalizable, ReadOnlyCo
/**
* Increments the values of this color with the given r, g, b and a values.
*
- * @param r the red component
- * @param g the green component
- * @param b the blue component
- * @param a the alpha component
+ * @param r
+ * the red component
+ * @param g
+ * the green component
+ * @param b
+ * the blue component
+ * @param a
+ * the alpha component
* @return this color for chaining
*/
public ColorRGBA addLocal(final float r, final float g, final float b, final float a) {
@@ -500,7 +517,8 @@ public class ColorRGBA implements Cloneable, Savable, Externalizable, ReadOnlyCo
/**
* Adds the values of the given source color to those of this color and returns them in store.
*
- * @param source the source color
+ * @param source
+ * the source color
* @param store
* the color to store the result in for return. If null, a new color object is created and returned.
* @return (this.r + source.r, this.g + source.g, this.b + source.b, this.a + source.a)
@@ -515,7 +533,8 @@ public class ColorRGBA implements Cloneable, Savable, Externalizable, ReadOnlyCo
/**
* Increments the values of this color with the r, g, b and a values of the given color.
*
- * @param source the source color
+ * @param source
+ * the source color
* @return this color for chaining
* @throws NullPointerException
* if source is null.
@@ -527,10 +546,14 @@ public class ColorRGBA implements Cloneable, Savable, Externalizable, ReadOnlyCo
/**
* Subtracts the given values from those of this color and returns them in store.
*
- * @param r the red component
- * @param g the green component
- * @param b the blue component
- * @param a the alpha component
+ * @param r
+ * the red component
+ * @param g
+ * the green component
+ * @param b
+ * the blue component
+ * @param a
+ * the alpha component
* @param store
* the color to store the result in for return. If null, a new color object is created and returned.
* @return (this.r - r, this.g - g, this.b - b, this.a - a)
@@ -548,10 +571,14 @@ public class ColorRGBA implements Cloneable, Savable, Externalizable, ReadOnlyCo
/**
* Decrements the values of this color by the given r, g, b and a values.
*
- * @param r the red component
- * @param g the green component
- * @param b the blue component
- * @param a the alpha component
+ * @param r
+ * the red component
+ * @param g
+ * the green component
+ * @param b
+ * the blue component
+ * @param a
+ * the alpha component
* @return this color for chaining
*/
public ColorRGBA subtractLocal(final float r, final float g, final float b, final float a) {
@@ -561,7 +588,8 @@ public class ColorRGBA implements Cloneable, Savable, Externalizable, ReadOnlyCo
/**
* Subtracts the values of the given source color from those of this color and returns them in store.
*
- * @param source the source color
+ * @param source
+ * the source color
* @param store
* the color to store the result in for return. If null, a new color object is created and returned.
* @return (this.r - source.r, this.g - source.g, this.b - source.b, this.a - source.a)
@@ -576,7 +604,8 @@ public class ColorRGBA implements Cloneable, Savable, Externalizable, ReadOnlyCo
/**
* Decrements the values of this color by the r, g, b and a values from the given source color.
*
- * @param source the source color
+ * @param source
+ * the source color
* @return this color for chaining
* @throws NullPointerException
* if source is null.
@@ -588,7 +617,8 @@ public class ColorRGBA implements Cloneable, Savable, Externalizable, ReadOnlyCo
/**
* Multiplies the values of this color by the given scalar value and returns the result in store.
*
- * @param scalar the scalar value
+ * @param scalar
+ * the scalar value
* @param store
* the color to store the result in for return. If null, a new color object is created and returned.
* @return a new color (this.r * scalar, this.g * scalar, this.b * scalar, this.a * scalar)
@@ -606,7 +636,8 @@ public class ColorRGBA implements Cloneable, Savable, Externalizable, ReadOnlyCo
/**
* Internally modifies the values of this color by multiplying them each by the given scalar value.
*
- * @param scalar the scalar value
+ * @param scalar
+ * the scalar value
* @return this color for chaining
*
*/
@@ -617,7 +648,8 @@ public class ColorRGBA implements Cloneable, Savable, Externalizable, ReadOnlyCo
/**
* Multiplies the values of this color by the given scalar value and returns the result in store.
*
- * @param scale the scale values
+ * @param scale
+ * the scale values
* @param store
* the color to store the result in for return. If null, a new color object is created and returned.
* @return a new color (this.r * scale.r, this.g * scale.g, this.b * scale.b, this.a * scale.a)
@@ -636,7 +668,8 @@ public class ColorRGBA implements Cloneable, Savable, Externalizable, ReadOnlyCo
/**
* Internally modifies the values of this color by multiplying them each by the given scale values.
*
- * @param scale the scale values
+ * @param scale
+ * the scale values
* @return this color for chaining
*/
public ColorRGBA multiplyLocal(final ReadOnlyColorRGBA scale) {
@@ -647,7 +680,8 @@ public class ColorRGBA implements Cloneable, Savable, Externalizable, ReadOnlyCo
/**
* Divides the values of this color by the given scalar value and returns the result in store.
*
- * @param scalar the scalar value
+ * @param scalar
+ * the scalar value
* @param store
* the color to store the result in for return. If null, a new color object is created and returned.
* @return a new color (this.r / scalar, this.g / scalar, this.b / scalar, this.a / scalar)
@@ -665,7 +699,8 @@ public class ColorRGBA implements Cloneable, Savable, Externalizable, ReadOnlyCo
/**
* Internally modifies the values of this color by dividing them each by the given scalar value.
*
- * @param scalar the scalar value
+ * @param scalar
+ * the scalar value
* @return this color for chaining
* @throws ArithmeticException
* if scalar is 0
@@ -679,7 +714,8 @@ public class ColorRGBA implements Cloneable, Savable, Externalizable, ReadOnlyCo
/**
* Divides the values of this color by the given scale values and returns the result in store.
*
- * @param scale the scale values
+ * @param scale
+ * the scale values
* @param store
* the color to store the result in for return. If null, a new color object is created and returned.
* @return a new color (this.r / scale.r, this.g / scale.g, this.b / scale.b, this.a / scale.a)
@@ -698,7 +734,8 @@ public class ColorRGBA implements Cloneable, Savable, Externalizable, ReadOnlyCo
/**
* Internally modifies the values of this color by dividing them each by the given scale values.
*
- * @param scale the scale values
+ * @param scale
+ * the scale values
* @return this color for chaining
*/
public ColorRGBA divideLocal(final ReadOnlyColorRGBA scale) {
@@ -711,8 +748,10 @@ public class ColorRGBA implements Cloneable, Savable, Externalizable, ReadOnlyCo
* iow, if changeAmnt is closer to 0, the result will be closer to the current value of this color and if it is
* closer to 1, the result will be closer to the end value.
*
- * @param endColor the end color
- * @param scalar the scalar value
+ * @param endColor
+ * the end color
+ * @param scalar
+ * the scalar value
* @param store
* the color to store the result in for return. If null, a new color object is created and returned.
* @return a new mutable color as described above.
@@ -738,8 +777,10 @@ public class ColorRGBA implements Cloneable, Savable, Externalizable, ReadOnlyCo
* iow, if changeAmnt is closer to 0, the result will be closer to the current value of this color and if it is
* closer to 1, the result will be closer to the end value. The result is stored back in this color.
*
- * @param endColor the end color
- * @param scalar the scalar value
+ * @param endColor
+ * the end color
+ * @param scalar
+ * the scalar value
* @return this color for chaining
* @throws NullPointerException
* if endVec is null.
@@ -757,8 +798,10 @@ public class ColorRGBA implements Cloneable, Savable, Externalizable, ReadOnlyCo
* if changeAmnt is closer to 0, the result will be closer to the begin value and if it is closer to 1, the result
* will be closer to the end value.
*
- * @param beginColor the begin color
- * @param endColor the end color
+ * @param beginColor
+ * the begin color
+ * @param endColor
+ * the end color
* @param scalar
* the scalar as a percent.
* @param store
@@ -783,11 +826,13 @@ public class ColorRGBA implements Cloneable, Savable, Externalizable, ReadOnlyCo
/**
* Performs a linear interpolation between the given begin and end colors, using the given scalar as a percent. iow,
- * if scalar is closer to 0, the result will be closer to the begin value and if it is closer to 1, the result
- * will be closer to the end value. The result is stored back in this color.
+ * if scalar is closer to 0, the result will be closer to the begin value and if it is closer to 1, the result will
+ * be closer to the end value. The result is stored back in this color.
*
- * @param beginColor the begin color
- * @param endColor the end color
+ * @param beginColor
+ * the begin color
+ * @param endColor
+ * the end color
* @param scalar
* the scalar as a percent.
* @return this color for chaining
@@ -905,8 +950,10 @@ public class ColorRGBA implements Cloneable, Savable, Externalizable, ReadOnlyCo
*
* @param in
* ObjectInput
- * @throws IOException if something wrong happens while reading the float values
- * @throws ClassNotFoundException if a class is not found
+ * @throws IOException
+ * if something wrong happens while reading the float values
+ * @throws ClassNotFoundException
+ * if a class is not found
*/
@Override
public void readExternal(final ObjectInput in) throws IOException, ClassNotFoundException {
@@ -921,7 +968,8 @@ public class ColorRGBA implements Cloneable, Savable, Externalizable, ReadOnlyCo
*
* @param out
* ObjectOutput
- * @throws IOException exception
+ * @throws IOException
+ * exception
*/
@Override
public void writeExternal(final ObjectOutput out) throws IOException {
@@ -973,8 +1021,10 @@ public class ColorRGBA implements Cloneable, Savable, Externalizable, ReadOnlyCo
* <li>8: RRGGBBAA - RGBA is parsed as RR/255, GG/255, BB/255, AA/255</li>
* </ul>
*
- * @param colorString the color string
- * @param store the object used to store the result if not null
+ * @param colorString
+ * the color string
+ * @param store
+ * the object used to store the result if not null
* @return the parsed color
*/
public static ColorRGBA parseColor(final String colorString, final ColorRGBA store) {
diff --git a/ardor3d-math/src/main/java/com/ardor3d/math/FastMath.java b/ardor3d-math/src/main/java/com/ardor3d/math/FastMath.java
index 7b5106a..9cfe7e5 100644
--- a/ardor3d-math/src/main/java/com/ardor3d/math/FastMath.java
+++ b/ardor3d-math/src/main/java/com/ardor3d/math/FastMath.java
@@ -3,7 +3,7 @@
*
* This file is part of Ardor3D.
*
- * Ardor3D is free software: you can redistribute it and/or modify it
+ * Ardor3D is free software: you can redistribute it and/or modify it
* under the terms of its license which may be found in the accompanying
* LICENSE file or at <http://www.ardor3d.com/LICENSE>.
*/
@@ -12,7 +12,7 @@ package com.ardor3d.math;
/**
* A "close approximation" class for Math operations.
- *
+ *
* References:
* <ul>
* <li>http://www.devmaster.net/forums/showthread.php?t=5784</li>
@@ -21,7 +21,7 @@ package com.ardor3d.math;
* <li>http://www.lightsoft.co.uk/PD/stu/stuchat37.html</li>
* <li>http://wiki.java.net/bin/view/Games/JeffGems</li>
* </ul>
- *
+ *
* NB: With current improvements in hardware, I don't recommend using these and they will likely be deprecated/removed
* in the future.
*/
@@ -47,10 +47,11 @@ public enum FastMath {
private final static double _atan_a = 0.280872d;
- /**
+ /**
* sin: [-π,π] → [-1,1]
*
- * @param x x
+ * @param x
+ * x
*
* @return the sine
*/
@@ -59,10 +60,11 @@ public enum FastMath {
return FastMath._sin_p * (x * Math.abs(x) - x) + x;
}
- /**
- * cos: [-π,π] → [-1,1]
- *
- * @param x x
+ /**
+ * cos: [-π,π] → [-1,1]
+ *
+ * @param x
+ * x
*
* @return the cosine
*/
@@ -70,10 +72,11 @@ public enum FastMath {
return sin(x + (x > MathUtils.HALF_PI ? -MathUtils.THREE_PI_HALVES : MathUtils.HALF_PI));
}
- /**
+ /**
* tan: [-π,π] \ {-π/2,π/2} → R
*
- * @param x x
+ * @param x
+ * x
*
* @return the tangent
*/
@@ -81,10 +84,11 @@ public enum FastMath {
return sin(x) / cos(x);
}
- /**
- * asin: [-1,1] → [-π/2,π/2]
- *
- * @param x x
+ /**
+ * asin: [-1,1] → [-π/2,π/2]
+ *
+ * @param x
+ * x
*
* @return the arc sine
*/
@@ -93,10 +97,11 @@ public enum FastMath {
+ Math.signum(x) * (FastMath._asin_d - Math.sqrt(1 - x * x));
}
- /**
- * acos: [-1,1] → [0,π]
+ /**
+ * acos: [-1,1] → [0,π]
*
- * @param x x
+ * @param x
+ * x
*
* @return the arc cosine
*/
@@ -104,23 +109,25 @@ public enum FastMath {
return MathUtils.HALF_PI - asin(x);
}
- /**
- * atan: (-‚àû,‚àû) → (-π/2,π/2)
- *
- * @param x x
- *
+ /**
+ * atan: (-‚àû,‚àû) → (-π/2,π/2)
+ *
+ * @param x
+ * x
+ *
* @return the arc tangent
*/
public final static double atan(final double x) {
- return Math.abs(x) < 1 ? x / (1 + FastMath._atan_a * x * x) : Math.signum(x) * MathUtils.HALF_PI - x
- / (x * x + FastMath._atan_a);
+ return Math.abs(x) < 1 ? x / (1 + FastMath._atan_a * x * x)
+ : Math.signum(x) * MathUtils.HALF_PI - x / (x * x + FastMath._atan_a);
}
- /**
- * inverseSqrt: (0,‚àû) → (0,‚àû)
- *
- * @param x x
- *
+ /**
+ * inverseSqrt: (0,‚àû) → (0,‚àû)
+ *
+ * @param x
+ * x
+ *
* @return the inverse square root
*/
public final static double inverseSqrt(double x) {
diff --git a/ardor3d-math/src/main/java/com/ardor3d/math/Line3.java b/ardor3d-math/src/main/java/com/ardor3d/math/Line3.java
index a2c7b54..1c286c3 100644
--- a/ardor3d-math/src/main/java/com/ardor3d/math/Line3.java
+++ b/ardor3d-math/src/main/java/com/ardor3d/math/Line3.java
@@ -3,7 +3,7 @@
*
* This file is part of Ardor3D.
*
- * Ardor3D is free software: you can redistribute it and/or modify it
+ * Ardor3D is free software: you can redistribute it and/or modify it
* under the terms of its license which may be found in the accompanying
* LICENSE file or at <http://www.ardor3d.com/LICENSE>.
*/
@@ -28,7 +28,7 @@ public class Line3 extends Line3Base implements ReadOnlyLine3, Poolable {
/**
* Constructs a new line using the supplied origin point and unit length direction vector
- *
+ *
* @param origin
* the origin of the line.
* @param direction
@@ -40,8 +40,9 @@ public class Line3 extends Line3Base implements ReadOnlyLine3, Poolable {
/**
* Constructs a new line using the supplied source line
- *
- * @param source the source line
+ *
+ * @param source
+ * the source line
*/
public Line3(final ReadOnlyLine3 source) {
super(source.getOrigin(), source.getDirection());
@@ -49,8 +50,9 @@ public class Line3 extends Line3Base implements ReadOnlyLine3, Poolable {
/**
* Copies the values of the given source line into this line.
- *
- * @param source the source line
+ *
+ * @param source
+ * the source line
* @return this line for chaining
* @throws NullPointerException
* if source is null.
@@ -62,7 +64,8 @@ public class Line3 extends Line3Base implements ReadOnlyLine3, Poolable {
}
/**
- * @param point the point
+ * @param point
+ * the point
* @param store
* if not null, the closest point is stored in this param
* @return the squared distance from this line to the given point.
@@ -94,7 +97,7 @@ public class Line3 extends Line3Base implements ReadOnlyLine3, Poolable {
/**
* Check a line... if it is null or the values of its origin or direction are NaN or infinite, return false. Else
* return true.
- *
+ *
* @param line
* the line to check
* @return true or false as stated above.
@@ -151,7 +154,7 @@ public class Line3 extends Line3Base implements ReadOnlyLine3, Poolable {
*/
public final static Line3 fetchTempInstance() {
if (MathConstants.useMathPools) {
- return LINE3_POOL.fetch();
+ return Line3.LINE3_POOL.fetch();
} else {
return new Line3();
}
@@ -160,13 +163,13 @@ public class Line3 extends Line3Base implements ReadOnlyLine3, Poolable {
/**
* Releases a Line3 back to be used by a future call to fetchTempInstance. TAKE CARE: this Line3 object should no
* longer have other classes referencing it or "Bad Things" will happen.
- *
+ *
* @param line
* the Line3 to release.
*/
public final static void releaseTempInstance(final Line3 line) {
if (MathConstants.useMathPools) {
- LINE3_POOL.release(line);
+ Line3.LINE3_POOL.release(line);
}
}
}
diff --git a/ardor3d-math/src/main/java/com/ardor3d/math/Line3Base.java b/ardor3d-math/src/main/java/com/ardor3d/math/Line3Base.java
index f6548b5..12dba8d 100644
--- a/ardor3d-math/src/main/java/com/ardor3d/math/Line3Base.java
+++ b/ardor3d-math/src/main/java/com/ardor3d/math/Line3Base.java
@@ -48,7 +48,8 @@ public abstract class Line3Base implements Savable, Externalizable {
/**
* Sets the line's origin point to the values of the given vector.
*
- * @param origin the origin
+ * @param origin
+ * the origin
* @throws NullPointerException
* if normal is null.
*/
@@ -59,7 +60,8 @@ public abstract class Line3Base implements Savable, Externalizable {
/**
* Sets the line's direction to the values of the given vector.
*
- * @param direction the direction
+ * @param direction
+ * the direction
* @throws NullPointerException
* if direction is null.
*/
@@ -106,8 +108,10 @@ public abstract class Line3Base implements Savable, Externalizable {
*
* @param in
* ObjectInput
- * @throws IOException if something wrong occurs while reading
- * @throws ClassNotFoundException if a class is not found
+ * @throws IOException
+ * if something wrong occurs while reading
+ * @throws ClassNotFoundException
+ * if a class is not found
*/
@Override
public void readExternal(final ObjectInput in) throws IOException, ClassNotFoundException {
@@ -120,7 +124,8 @@ public abstract class Line3Base implements Savable, Externalizable {
*
* @param out
* ObjectOutput
- * @throws IOException if something wrong occurs while writing
+ * @throws IOException
+ * if something wrong occurs while writing
*/
@Override
public void writeExternal(final ObjectOutput out) throws IOException {
diff --git a/ardor3d-math/src/main/java/com/ardor3d/math/LineSegment3.java b/ardor3d-math/src/main/java/com/ardor3d/math/LineSegment3.java
index 8e55a44..fef1eac 100644
--- a/ardor3d-math/src/main/java/com/ardor3d/math/LineSegment3.java
+++ b/ardor3d-math/src/main/java/com/ardor3d/math/LineSegment3.java
@@ -54,10 +54,12 @@ public class LineSegment3 extends Line3Base implements ReadOnlyLineSegment3, Poo
/**
* Constructs a new segment segment using the supplied origin point, unit length direction vector and extent
*
- * @param origin the origin
- * @param direction the direction vector
- * - unit length
- * @param extent the extent
+ * @param origin
+ * the origin
+ * @param direction
+ * the direction vector - unit length
+ * @param extent
+ * the extent
*/
public LineSegment3(final ReadOnlyVector3 origin, final ReadOnlyVector3 direction, final double extent) {
super(origin, direction);
@@ -67,8 +69,10 @@ public class LineSegment3 extends Line3Base implements ReadOnlyLineSegment3, Poo
/**
* Constructs a new segment segment using the supplied start and end points
*
- * @param start the start point
- * @param end the end point
+ * @param start
+ * the start point
+ * @param end
+ * the end point
*/
public LineSegment3(final ReadOnlyVector3 start, final ReadOnlyVector3 end) {
this();
@@ -81,7 +85,8 @@ public class LineSegment3 extends Line3Base implements ReadOnlyLineSegment3, Poo
/**
* Copies the values of the given source segment into this segment.
*
- * @param source the line segment to copy from
+ * @param source
+ * the line segment to copy from
* @return this segment for chaining
* @throws NullPointerException
* if source is null.
@@ -103,7 +108,8 @@ public class LineSegment3 extends Line3Base implements ReadOnlyLineSegment3, Poo
/**
* Sets the segment's extent to the provided value.
*
- * @param extent the extent
+ * @param extent
+ * the extent
*/
public void setExtent(final double extent) {
_extent = extent;
@@ -130,7 +136,8 @@ public class LineSegment3 extends Line3Base implements ReadOnlyLineSegment3, Poo
}
/**
- * @param point the point
+ * @param point
+ * the point
* @param store
* if not null, the closest point is stored in this param
* @return the squared distance from this segment to the given point.
@@ -172,7 +179,8 @@ public class LineSegment3 extends Line3Base implements ReadOnlyLineSegment3, Poo
/**
*
- * @param store the object to store the result if not null
+ * @param store
+ * the object to store the result if not null
*
* @return a random position lying somewhere on this line segment.
*/
@@ -276,8 +284,10 @@ public class LineSegment3 extends Line3Base implements ReadOnlyLineSegment3, Poo
*
* @param in
* ObjectInput
- * @throws IOException if something wrong occurs while reading
- * @throws ClassNotFoundException if a class is not found
+ * @throws IOException
+ * if something wrong occurs while reading
+ * @throws ClassNotFoundException
+ * if a class is not found
*/
@Override
public void readExternal(final ObjectInput in) throws IOException, ClassNotFoundException {
@@ -290,7 +300,8 @@ public class LineSegment3 extends Line3Base implements ReadOnlyLineSegment3, Poo
*
* @param out
* ObjectOutput
- * @throws IOException if something wrong occurs while writing
+ * @throws IOException
+ * if something wrong occurs while writing
*/
@Override
public void writeExternal(final ObjectOutput out) throws IOException {
diff --git a/ardor3d-math/src/main/java/com/ardor3d/math/MathUtils.java b/ardor3d-math/src/main/java/com/ardor3d/math/MathUtils.java
index 0eda32e..6797c6c 100644
--- a/ardor3d-math/src/main/java/com/ardor3d/math/MathUtils.java
+++ b/ardor3d-math/src/main/java/com/ardor3d/math/MathUtils.java
@@ -3,7 +3,7 @@
*
* This file is part of Ardor3D.
*
- * Ardor3D is free software: you can redistribute it and/or modify it
+ * Ardor3D is free software: you can redistribute it and/or modify it
* under the terms of its license which may be found in the accompanying
* LICENSE file or at <http://www.ardor3d.com/LICENSE>.
*/
@@ -61,10 +61,11 @@ public class MathUtils {
* Fast Trig functions for x86. This forces the trig functiosn to stay within the safe area on the x86 processor
* (-45 degrees to +45 degrees) The results may be very slightly off from what the Math and StrictMath trig
* functions give due to rounding in the angle reduction but it will be very very close.
- *
+ *
* note: code from wiki posting on java.net by jeffpk
*
- * @param radians the angle in radians
+ * @param radians
+ * the angle in radians
*
* @return the reduced sine angle
*/
@@ -82,9 +83,9 @@ public class MathUtils {
/**
* Returns sine of a value.
- *
+ *
* note: code from wiki posting on java.net by jeffpk
- *
+ *
* @param dValue
* The value to sine, in radians.
* @return The sine of dValue.
@@ -96,13 +97,13 @@ public class MathUtils {
return MathConstants.useFastMath ? FastMath.sin(dValue) : Math.sin(dValue);
}
- return MathConstants.useFastMath ? FastMath.cos(MathUtils.HALF_PI - dValue) : Math.cos(MathUtils.HALF_PI
- - dValue);
+ return MathConstants.useFastMath ? FastMath.cos(MathUtils.HALF_PI - dValue)
+ : Math.cos(MathUtils.HALF_PI - dValue);
}
/**
* Returns cos of a value.
- *
+ *
* @param dValue
* The value to cosine, in radians.
* @return The cosine of dValue.
@@ -139,7 +140,7 @@ public class MathUtils {
/**
* Converts a point from Spherical coordinates to Cartesian (using positive Y as up) and stores the results in the
* store var.
- *
+ *
* @param sphereCoords
* (Radius, Azimuth, Polar)
* @param store
@@ -162,8 +163,9 @@ public class MathUtils {
/**
* Converts a point from Cartesian coordinates (using positive Y as up) to Spherical and stores the results in the
* store var. (Radius, Azimuth, Polar)
- *
- * @param cartCoords the Cartesian coordinates (using positive Y as up)
+ *
+ * @param cartCoords
+ * the Cartesian coordinates (using positive Y as up)
* @param store
* the vector to store the result in for return. If null, a new vector object is created and returned.
* @return the spherical coordinates
@@ -187,7 +189,7 @@ public class MathUtils {
/**
* Converts a point from Spherical coordinates to Cartesian (using positive Z as up) and stores the results in the
* store var.
- *
+ *
* @param sphereCoords
* (Radius, Azimuth, Polar)
* @param store
@@ -210,8 +212,9 @@ public class MathUtils {
/**
* Converts a point from Cartesian coordinates (using positive Z as up) to Spherical and stores the results in the
* store var. (Radius, Azimuth, Polar)
- *
- * @param cartCoords the Cartesian coordinates (using positive Z as up)
+ *
+ * @param cartCoords
+ * the Cartesian coordinates (using positive Z as up)
* @param store
* the vector to store the result in for return. If null, a new vector object is created and returned.
* @return the spherical coordinates
@@ -234,11 +237,11 @@ public class MathUtils {
/**
* Returns true if the number is a power of 2 (2,4,8,16...)
- *
+ *
* A good implementation found on the Java boards. note: a number is a power of two if and only if it is the
* smallest number with that number of significant bits. Therefore, if you subtract 1, you know that the new number
* will have fewer bits, so ANDing the original number with anything less than it will give 0.
- *
+ *
* @param number
* The number to test.
* @return True if it is a power of two.
@@ -249,7 +252,7 @@ public class MathUtils {
/**
* @param number
- The number to test
+ * The number to test
* @return the closest power of two to the given number.
*/
public static int nearestPowerOfTwo(final int number) {
@@ -257,8 +260,10 @@ public class MathUtils {
}
/**
- * @param value the value
- * @param base the base
+ * @param value
+ * the value
+ * @param base
+ * the base
* @return the logarithm of value with given base, calculated as log(value)/log(base) such that pow(base,
* return)==value
*/
@@ -268,8 +273,9 @@ public class MathUtils {
/**
* Sets the seed to use for "random" operations. The default is the current system milliseconds.
- *
- * @param seed the seed
+ *
+ * @param seed
+ * the seed
*/
public static void setRandomSeed(final long seed) {
MathUtils.rand.setSeed(seed);
@@ -277,7 +283,7 @@ public class MathUtils {
/**
* Returns a random double between 0 and 1.
- *
+ *
* @return A random double between <tt>0.0</tt> (inclusive) to <tt>1.0</tt> (exclusive).
*/
public static double nextRandomDouble() {
@@ -286,7 +292,7 @@ public class MathUtils {
/**
* Returns a random float between 0 and 1.
- *
+ *
* @return A random float between <tt>0.0f</tt> (inclusive) to <tt>1.0f</tt> (exclusive).
*/
public static float nextRandomFloat() {
@@ -302,10 +308,12 @@ public class MathUtils {
/**
* Returns a random int between min and max.
- *
- * @param min the minimum value
- * @param max the maximum value
- *
+ *
+ * @param min
+ * the minimum value
+ * @param max
+ * the maximum value
+ *
* @return A random int between <tt>min</tt> (inclusive) to <tt>max</tt> (inclusive).
*/
public static int nextRandomInt(final int min, final int max) {
@@ -313,10 +321,13 @@ public class MathUtils {
}
/**
- *
- * @param percent the percent value
- * @param startValue the start value
- * @param endValue the end value
+ *
+ * @param percent
+ * the percent value
+ * @param startValue
+ * the start value
+ * @param endValue
+ * the end value
* @return the lerp
*/
public static float lerp(final float percent, final float startValue, final float endValue) {
@@ -327,10 +338,13 @@ public class MathUtils {
}
/**
- *
- * @param percent the percent value
- * @param startValue the start value
- * @param endValue the end value
+ *
+ * @param percent
+ * the percent value
+ * @param startValue
+ * the start value
+ * @param endValue
+ * the end value
* @return the lerp
*/
public static double lerp(final double percent, final double startValue, final double endValue) {
@@ -342,7 +356,7 @@ public class MathUtils {
/**
* plot a given value on the cubic S-curve: 3t^2 - 2t^3
- *
+ *
* @param t
* our input value
* @return the plotted value
@@ -355,7 +369,7 @@ public class MathUtils {
/**
* plot a given value on the cubic S-curve: 3t^2 - 2t^3
- *
+ *
* @param t
* our input value
* @return the plotted value
@@ -368,7 +382,7 @@ public class MathUtils {
/**
* plot a given value on the quintic S-curve: 6t^5 - 15t^4 + 10t^3
- *
+ *
* @param t
* our input value
* @return the plotted value
@@ -382,7 +396,7 @@ public class MathUtils {
/**
* plot a given value on the quintic S-curve: 6t^5 - 15t^4 + 10t^3
- *
+ *
* @param t
* our input value
* @return the plotted value
@@ -395,14 +409,21 @@ public class MathUtils {
}
/**
- *
- * @param left the left abscissa
- * @param right the right abscissa
- * @param bottom the bottom ordinate
- * @param top the top ordinate
- * @param nearZ the near applicate
- * @param farZ the far applicate
- * @param store the object to store the matrix of the frustum (similar to glFrustum)
+ *
+ * @param left
+ * the left abscissa
+ * @param right
+ * the right abscissa
+ * @param bottom
+ * the bottom ordinate
+ * @param top
+ * the top ordinate
+ * @param nearZ
+ * the near applicate
+ * @param farZ
+ * the far applicate
+ * @param store
+ * the object to store the matrix of the frustum (similar to glFrustum)
*/
public static void matrixFrustum(final double left, final double right, final double bottom, final double top,
final double nearZ, final double farZ, final Matrix4 store) {
@@ -417,29 +438,41 @@ public class MathUtils {
}
/**
- *
- * @param left the left abscissa
- * @param right the right abscissa
- * @param bottom the bottom ordinate
- * @param top the top ordinate
- * @param nearZ the near applicate
- * @param farZ the far applicate
- * @param store the object to store the matrix in orthogonal projection
+ *
+ * @param left
+ * the left abscissa
+ * @param right
+ * the right abscissa
+ * @param bottom
+ * the bottom ordinate
+ * @param top
+ * the top ordinate
+ * @param nearZ
+ * the near applicate
+ * @param farZ
+ * the far applicate
+ * @param store
+ * the object to store the matrix in orthogonal projection
*/
public static void matrixOrtho(final double left, final double right, final double bottom, final double top,
final double nearZ, final double farZ, final Matrix4 store) {
- store.set(2.0 / (right - left), 0.0, 0.0, 0.0, 0.0, 2.0 / (top - bottom), 0.0, 0.0, 0.0, 0.0, -2.0
- / (farZ - nearZ), 0.0, -(right + left) / (right - left), -(top + bottom) / (top - bottom),
+ store.set(2.0 / (right - left), 0.0, 0.0, 0.0, 0.0, 2.0 / (top - bottom), 0.0, 0.0, 0.0, 0.0,
+ -2.0 / (farZ - nearZ), 0.0, -(right + left) / (right - left), -(top + bottom) / (top - bottom),
-(farZ + nearZ) / (farZ - nearZ), 1.0);
}
/**
- *
- * @param fovY the fov Y
- * @param aspect the aspect
- * @param zNear the near applicate
- * @param zFar the far applicate
- * @param store the object to store the matrix in perspective projection (similar to gluPerspective)
+ *
+ * @param fovY
+ * the fov Y
+ * @param aspect
+ * the aspect
+ * @param zNear
+ * the near applicate
+ * @param zFar
+ * the far applicate
+ * @param store
+ * the object to store the matrix in perspective projection (similar to gluPerspective)
*/
public static void matrixPerspective(final double fovY, final double aspect, final double zNear, final double zFar,
final Matrix4 store) {
@@ -450,11 +483,15 @@ public class MathUtils {
}
/**
- *
- * @param position the position
- * @param target the target
- * @param worldUp the up vector
- * @param store the object to store the result, the model view matrix (similar to gluLookAt)
+ *
+ * @param position
+ * the position
+ * @param target
+ * the target
+ * @param worldUp
+ * the up vector
+ * @param store
+ * the object to store the result, the model view matrix (similar to gluLookAt)
*/
public static void matrixLookAt(final ReadOnlyVector3 position, final ReadOnlyVector3 target,
final ReadOnlyVector3 worldUp, final Matrix4 store) {
@@ -467,10 +504,12 @@ public class MathUtils {
side.cross(direction, up);
store.set(side.getX(), up.getX(), -direction.getX(), 0.0, side.getY(), up.getY(), -direction.getY(), 0.0,
- side.getZ(), up.getZ(), -direction.getZ(), 0.0, side.getX() * -position.getX() + side.getY()
- * -position.getY() + side.getZ() * -position.getZ(), up.getX() * -position.getX() + up.getY()
- * -position.getY() + up.getZ() * -position.getZ(), -direction.getX() * -position.getX()
- + -direction.getY() * -position.getY() + -direction.getZ() * -position.getZ(), 1.0);
+ side.getZ(), up.getZ(), -direction.getZ(), 0.0,
+ side.getX() * -position.getX() + side.getY() * -position.getY() + side.getZ() * -position.getZ(),
+ up.getX() * -position.getX() + up.getY() * -position.getY() + up.getZ() * -position.getZ(),
+ -direction.getX() * -position.getX() + -direction.getY() * -position.getY()
+ + -direction.getZ() * -position.getZ(),
+ 1.0);
Vector3.releaseTempInstance(up);
Vector3.releaseTempInstance(side);
@@ -478,11 +517,15 @@ public class MathUtils {
}
/**
- *
- * @param position the position
- * @param target the target
- * @param worldUp the up vector
- * @param store the object to store the result, the model view matrix (similar to gluLookAt)
+ *
+ * @param position
+ * the position
+ * @param target
+ * the target
+ * @param worldUp
+ * the up vector
+ * @param store
+ * the object to store the result, the model view matrix (similar to gluLookAt)
*/
public static void matrixLookAt(final ReadOnlyVector3 position, final ReadOnlyVector3 target,
final ReadOnlyVector3 worldUp, final Matrix3 store) {
@@ -505,7 +548,7 @@ public class MathUtils {
/**
* Faster floor function. Does not handle NaN and Infinity. (Not handled when doing Math.floor and just casting
* anyways, so question is if we want to handle it or not)
- *
+ *
* @param val
* Value to floor
* @return Floored int value
@@ -518,7 +561,7 @@ public class MathUtils {
/**
* Faster floor function. Does not handle NaN and Infinity. (Not handled when doing Math.floor and just casting
* anyways, so question is if we want to handle it or not)
- *
+ *
* @param val
* Value to floor
* @return Floored long value
@@ -568,7 +611,7 @@ public class MathUtils {
/**
* Simple 2^x
- *
+ *
* @param x
* power
* @return 2^x
diff --git a/ardor3d-math/src/main/java/com/ardor3d/math/Matrix3.java b/ardor3d-math/src/main/java/com/ardor3d/math/Matrix3.java
index 1ae320b..25de9f9 100644
--- a/ardor3d-math/src/main/java/com/ardor3d/math/Matrix3.java
+++ b/ardor3d-math/src/main/java/com/ardor3d/math/Matrix3.java
@@ -64,14 +64,23 @@ public class Matrix3 implements Cloneable, Savable, Externalizable, ReadOnlyMatr
* Constructs a new, mutable matrix using the given matrix values (names are mRC = m[ROW][COL])
*
* @param m00
+ * m00
* @param m01
+ * m01
* @param m02
+ * m02
* @param m10
+ * m10
* @param m11
+ * m11
* @param m12
+ * m12
* @param m20
+ * m20
* @param m21
+ * m21
* @param m22
+ * m22
*/
public Matrix3(final double m00, final double m01, final double m02, final double m10, final double m11,
final double m12, final double m20, final double m21, final double m22) {
@@ -91,6 +100,7 @@ public class Matrix3 implements Cloneable, Savable, Externalizable, ReadOnlyMatr
* Constructs a new, mutable matrix using the values from the given matrix
*
* @param source
+ * the source matrix
*/
public Matrix3(final ReadOnlyMatrix3 source) {
set(source);
@@ -98,7 +108,9 @@ public class Matrix3 implements Cloneable, Savable, Externalizable, ReadOnlyMatr
/**
* @param row
+ * the row index
* @param column
+ * the column index
* @return the value stored in this matrix at row, column.
* @throws IllegalArgumentException
* if row and column are not in bounds [0, 2]
@@ -143,7 +155,9 @@ public class Matrix3 implements Cloneable, Savable, Externalizable, ReadOnlyMatr
/**
* @param row
+ * the row index
* @param column
+ * the column index
* @return the value stored in this matrix at row, column, pre-cast to a float for convenience.
* @throws IllegalArgumentException
* if row and column are not in bounds [0, 2]
@@ -255,8 +269,11 @@ public class Matrix3 implements Cloneable, Savable, Externalizable, ReadOnlyMatr
* Sets the value of this matrix at row, column to the given value.
*
* @param row
+ * the row index
* @param column
+ * the column index
* @param value
+ * the value to set
* @return this matrix for chaining
* @throws IllegalArgumentException
* if row and column are not in bounds [0, 2]
@@ -322,14 +339,23 @@ public class Matrix3 implements Cloneable, Savable, Externalizable, ReadOnlyMatr
* Sets the values of this matrix to the values given.
*
* @param m00
+ * m00
* @param m01
+ * m01
* @param m02
+ * m02
* @param m10
+ * m10
* @param m11
+ * m11
* @param m12
+ * m12
* @param m20
+ * m20
* @param m21
+ * m21
* @param m22
+ * m22
* @return this matrix for chaining
*/
public Matrix3 set(final double m00, final double m01, final double m02, final double m10, final double m11,
@@ -352,6 +378,7 @@ public class Matrix3 implements Cloneable, Savable, Externalizable, ReadOnlyMatr
* Sets the values of this matrix to the values of the provided source matrix.
*
* @param source
+ * the source matrix
* @return this matrix for chaining
* @throws NullPointerException
* if source is null.
@@ -376,6 +403,7 @@ public class Matrix3 implements Cloneable, Savable, Externalizable, ReadOnlyMatr
* Sets the values of this matrix to the rotational value of the given quaternion.
*
* @param quaternion
+ * the quaternion
* @return this matrix for chaining
*/
public Matrix3 set(final ReadOnlyQuaternion quaternion) {
@@ -427,7 +455,7 @@ public class Matrix3 implements Cloneable, Savable, Externalizable, ReadOnlyMatr
/**
* Note: data is cast to floats.
*
- * @param store
+ * @param source
* the buffer to read our matrix data from.
* @return this matrix for chaining.
*/
@@ -438,7 +466,7 @@ public class Matrix3 implements Cloneable, Savable, Externalizable, ReadOnlyMatr
/**
* Note: data is cast to floats.
*
- * @param store
+ * @param source
* the buffer to read our matrix data from.
* @param rowMajor
* if true, data is stored row by row. Otherwise it is stored column by column.
@@ -474,6 +502,7 @@ public class Matrix3 implements Cloneable, Savable, Externalizable, ReadOnlyMatr
* Sets the values of this matrix to the values of the provided double array.
*
* @param source
+ * the source matrix
* @return this matrix for chaining
* @throws NullPointerException
* if source is null.
@@ -488,7 +517,9 @@ public class Matrix3 implements Cloneable, Savable, Externalizable, ReadOnlyMatr
* Sets the values of this matrix to the values of the provided double array.
*
* @param source
+ * the source matrix
* @param rowMajor
+ * <code>true</code> if the matrix is row major
* @return this matrix for chaining
* @throws NullPointerException
* if source is null.
@@ -524,7 +555,9 @@ public class Matrix3 implements Cloneable, Savable, Externalizable, ReadOnlyMatr
* Replaces a column in this matrix with the values of the given vector.
*
* @param columnIndex
+ * the column index
* @param columnData
+ * the column data
* @return this matrix for chaining
* @throws NullPointerException
* if columnData is null.
@@ -558,7 +591,9 @@ public class Matrix3 implements Cloneable, Savable, Externalizable, ReadOnlyMatr
* Replaces a row in this matrix with the values of the given vector.
*
* @param rowIndex
+ * the row index
* @param rowData
+ * the row date
* @return this matrix for chaining
* @throws NullPointerException
* if rowData is null.
@@ -592,8 +627,11 @@ public class Matrix3 implements Cloneable, Savable, Externalizable, ReadOnlyMatr
* Set the values of this matrix from the axes (columns) provided.
*
* @param uAxis
+ * the u axis
* @param vAxis
+ * the v axis
* @param wAxis
+ * the w axis
* @return this matrix for chaining
* @throws NullPointerException
* if any of the axes are null.
@@ -743,7 +781,8 @@ public class Matrix3 implements Cloneable, Savable, Externalizable, ReadOnlyMatr
* Apply rotation around X (Mrx * this)
*
* @param angle
- * @return
+ * the rotation angle
+ * @return this matrix for chaining
*/
public Matrix3 applyRotationX(final double angle) {
final double m01 = _m01, m02 = _m02, //
@@ -769,7 +808,8 @@ public class Matrix3 implements Cloneable, Savable, Externalizable, ReadOnlyMatr
* Apply rotation around Y (Mry * this)
*
* @param angle
- * @return
+ * the rotation angle
+ * @return this matrix for chaining
*/
public Matrix3 applyRotationY(final double angle) {
final double m00 = _m00, m02 = _m02, //
@@ -795,7 +835,8 @@ public class Matrix3 implements Cloneable, Savable, Externalizable, ReadOnlyMatr
* Apply rotation around Z (Mrz * this)
*
* @param angle
- * @return
+ * the rotation angle
+ * @return this matrix for chaining
*/
public Matrix3 applyRotationZ(final double angle) {
final double m00 = _m00, m01 = _m01, //
@@ -819,6 +860,7 @@ public class Matrix3 implements Cloneable, Savable, Externalizable, ReadOnlyMatr
/**
* @param index
+ * the index of the column
* @param store
* the vector object to store the result in. if null, a new one is created.
* @return the column specified by the index.
@@ -857,6 +899,7 @@ public class Matrix3 implements Cloneable, Savable, Externalizable, ReadOnlyMatr
/**
* @param index
+ * the index of the row
* @param store
* the vector object to store the result in. if null, a new one is created.
* @return the row specified by the index.
@@ -1008,7 +1051,7 @@ public class Matrix3 implements Cloneable, Savable, Externalizable, ReadOnlyMatr
* the double array to store our matrix data in. If null, a new array is created.
* @return matrix data as a double array in row major order.
* @throws IllegalArgumentException
- * if the store is non-null and has a length < 9
+ * if the store is non-null and has a length &lt; 9
*/
@Override
public double[] toArray(final double[] store) {
@@ -1022,7 +1065,7 @@ public class Matrix3 implements Cloneable, Savable, Externalizable, ReadOnlyMatr
* if true, data is stored row by row. Otherwise it is stored column by column.
* @return matrix data as a double array in the specified order.
* @throws IllegalArgumentException
- * if the store is non-null and has a length < 9
+ * if the store is non-null and has a length &lt; 9
*/
@Override
public double[] toArray(final double[] store, final boolean rowMajor) {
@@ -1101,6 +1144,7 @@ public class Matrix3 implements Cloneable, Savable, Externalizable, ReadOnlyMatr
/**
* @param matrix
+ * the matrix
* @return This matrix for chaining, modified internally to reflect multiplication against the given matrix
* @throws NullPointerException
* if matrix is null
@@ -1111,6 +1155,7 @@ public class Matrix3 implements Cloneable, Savable, Externalizable, ReadOnlyMatr
/**
* @param matrix
+ * the matrix
* @param store
* a matrix to store the result in. if null, a new matrix is created. It is safe for the given matrix and
* this parameter to be the same object.
@@ -1144,6 +1189,7 @@ public class Matrix3 implements Cloneable, Savable, Externalizable, ReadOnlyMatr
* stored into the supplied "store" matrix.
*
* @param vec
+ * the vector
* @param store
* a matrix to store the result in. If store is null, a new matrix is created. Note that it IS safe for
* vec and store to be the same object.
@@ -1171,6 +1217,7 @@ public class Matrix3 implements Cloneable, Savable, Externalizable, ReadOnlyMatr
* stored into the supplied "store" matrix.
*
* @param vec
+ * the vector
* @param store
* a matrix to store the result in. If store is null, a new matrix is created. Note that it IS safe for
* vec and store to be the same object.
@@ -1197,6 +1244,7 @@ public class Matrix3 implements Cloneable, Savable, Externalizable, ReadOnlyMatr
* Internally scales all values of this matrix by the given scalar.
*
* @param scalar
+ * the scalar value
* @return this matrix for chaining.
*/
public Matrix3 multiplyLocal(final double scalar) {
@@ -1302,6 +1350,7 @@ public class Matrix3 implements Cloneable, Savable, Externalizable, ReadOnlyMatr
* Applies the given scale to this matrix and returns the result as a new matrix
*
* @param scale
+ * the scale value
* @param store
* a matrix to store the result in. If store is null, a new matrix is created.
* @return the new matrix
@@ -1325,6 +1374,7 @@ public class Matrix3 implements Cloneable, Savable, Externalizable, ReadOnlyMatr
* Applies the given scale to this matrix values internally
*
* @param scale
+ * the scale value
* @return this matrix for chaining.
* @throws NullPointerException
* if scale is null.
@@ -1873,7 +1923,9 @@ public class Matrix3 implements Cloneable, Savable, Externalizable, ReadOnlyMatr
* @param in
* ObjectInput
* @throws IOException
+ * if something wrong occurs while reading
* @throws ClassNotFoundException
+ * if a class is not found
*/
@Override
public void readExternal(final ObjectInput in) throws IOException, ClassNotFoundException {
@@ -1894,6 +1946,7 @@ public class Matrix3 implements Cloneable, Savable, Externalizable, ReadOnlyMatr
* @param out
* ObjectOutput
* @throws IOException
+ * if something wrong occurs while writing
*/
@Override
public void writeExternal(final ObjectOutput out) throws IOException {
diff --git a/ardor3d-math/src/main/java/com/ardor3d/math/Plane.java b/ardor3d-math/src/main/java/com/ardor3d/math/Plane.java
index 85d3d31..2eaf137 100644
--- a/ardor3d-math/src/main/java/com/ardor3d/math/Plane.java
+++ b/ardor3d-math/src/main/java/com/ardor3d/math/Plane.java
@@ -61,7 +61,9 @@ public class Plane implements Cloneable, Savable, Externalizable, ReadOnlyPlane,
* Constructs a new plane using the supplied normal vector and plane constant
*
* @param normal
+ * the normal
* @param constant
+ * the constant
*/
public Plane(final ReadOnlyVector3 normal, final double constant) {
_normal.set(normal);
@@ -86,6 +88,7 @@ public class Plane implements Cloneable, Savable, Externalizable, ReadOnlyPlane,
* Sets the value of this plane to the constant and normal values of the provided source plane.
*
* @param source
+ * the source plane
* @return this plane for chaining
* @throws NullPointerException
* if source is null.
@@ -100,6 +103,7 @@ public class Plane implements Cloneable, Savable, Externalizable, ReadOnlyPlane,
* Sets the constant value of this plane to the given double value.
*
* @param constant
+ * the constant to set
*/
public void setConstant(final double constant) {
_constant = constant;
@@ -109,6 +113,7 @@ public class Plane implements Cloneable, Savable, Externalizable, ReadOnlyPlane,
* Sets the plane normal to the values of the given vector.
*
* @param normal
+ * the normal to set
* @throws NullPointerException
* if normal is null.
*/
@@ -118,6 +123,7 @@ public class Plane implements Cloneable, Savable, Externalizable, ReadOnlyPlane,
/**
* @param point
+ * the point
* @return the distance from this plane to a provided point. If the point is on the negative side of the plane the
* distance returned is negative, otherwise it is positive. If the point is on the plane, it is zero.
* @throws NullPointerException
@@ -130,6 +136,7 @@ public class Plane implements Cloneable, Savable, Externalizable, ReadOnlyPlane,
/**
* @param point
+ * the point
* @return the side of this plane on which the given point lies.
* @see Side
* @throws NullPointerException
@@ -151,8 +158,11 @@ public class Plane implements Cloneable, Savable, Externalizable, ReadOnlyPlane,
* Sets this plane to the plane defined by the given three points.
*
* @param pointA
+ * the point A
* @param pointB
+ * the point B
* @param pointC
+ * the point C
* @return this plane for chaining
* @throws NullPointerException
* if one or more of the points are null.
@@ -281,7 +291,9 @@ public class Plane implements Cloneable, Savable, Externalizable, ReadOnlyPlane,
* @param in
* ObjectInput
* @throws IOException
+ * if something wrong occurs while reading
* @throws ClassNotFoundException
+ * if a class is not found
*/
@Override
public void readExternal(final ObjectInput in) throws IOException, ClassNotFoundException {
@@ -295,6 +307,7 @@ public class Plane implements Cloneable, Savable, Externalizable, ReadOnlyPlane,
* @param out
* ObjectOutput
* @throws IOException
+ * if something wrong occurs while writing
*/
@Override
public void writeExternal(final ObjectOutput out) throws IOException {
diff --git a/ardor3d-math/src/main/java/com/ardor3d/math/Quaternion.java b/ardor3d-math/src/main/java/com/ardor3d/math/Quaternion.java
index a7838ab..1447fa8 100644
--- a/ardor3d-math/src/main/java/com/ardor3d/math/Quaternion.java
+++ b/ardor3d-math/src/main/java/com/ardor3d/math/Quaternion.java
@@ -60,6 +60,7 @@ public class Quaternion implements Cloneable, Savable, Externalizable, ReadOnlyQ
* Constructs a new quaternion set to the (x, y, z, w) values of the given source quaternion.
*
* @param source
+ * the source quaternion
*/
public Quaternion(final ReadOnlyQuaternion source) {
this(source.getX(), source.getY(), source.getZ(), source.getW());
@@ -69,9 +70,13 @@ public class Quaternion implements Cloneable, Savable, Externalizable, ReadOnlyQ
* Constructs a new quaternion set to (x, y, z, w).
*
* @param x
+ * the x value
* @param y
+ * the y value
* @param z
+ * the z value
* @param w
+ * the w value
*/
public Quaternion(final double x, final double y, final double z, final double w) {
_x = x;
@@ -146,6 +151,7 @@ public class Quaternion implements Cloneable, Savable, Externalizable, ReadOnlyQ
* Sets the x component of this quaternion to the given double value.
*
* @param x
+ * the x value to set
*/
public void setX(final double x) {
_x = x;
@@ -155,6 +161,7 @@ public class Quaternion implements Cloneable, Savable, Externalizable, ReadOnlyQ
* Sets the y component of this quaternion to the given double value.
*
* @param y
+ * the y value to set
*/
public void setY(final double y) {
_y = y;
@@ -164,6 +171,7 @@ public class Quaternion implements Cloneable, Savable, Externalizable, ReadOnlyQ
* Sets the z component of this quaternion to the given double value.
*
* @param z
+ * the z value to set
*/
public void setZ(final double z) {
_z = z;
@@ -173,6 +181,7 @@ public class Quaternion implements Cloneable, Savable, Externalizable, ReadOnlyQ
* Sets the w component of this quaternion to the given double value.
*
* @param w
+ * the w value to set
*/
public void setW(final double w) {
_w = w;
@@ -182,9 +191,13 @@ public class Quaternion implements Cloneable, Savable, Externalizable, ReadOnlyQ
* Sets the value of this quaternion to (x, y, z, w)
*
* @param x
+ * the x value
* @param y
+ * the y value
* @param z
+ * the z value
* @param w
+ * the w value
* @return this quaternion for chaining
*/
public Quaternion set(final double x, final double y, final double z, final double w) {
@@ -199,6 +212,7 @@ public class Quaternion implements Cloneable, Savable, Externalizable, ReadOnlyQ
* Sets the value of this quaternion to the (x, y, z, w) values of the provided source quaternion.
*
* @param source
+ * the source quaternion
* @return this quaternion for chaining
* @throws NullPointerException
* if source is null.
@@ -316,6 +330,7 @@ public class Quaternion implements Cloneable, Savable, Externalizable, ReadOnlyQ
* Sets the value of this quaternion to the rotation described by the given matrix.
*
* @param matrix
+ * the matrix
* @return this quaternion for chaining
* @throws NullPointerException
* if matrix is null.
@@ -329,14 +344,23 @@ public class Quaternion implements Cloneable, Savable, Externalizable, ReadOnlyQ
* Sets the value of this quaternion to the rotation described by the given matrix values.
*
* @param m00
+ * m00
* @param m01
+ * m01
* @param m02
+ * m02
* @param m10
+ * m10
* @param m11
+ * m11
* @param m12
+ * m12
* @param m20
+ * m20
* @param m21
+ * m21
* @param m22
+ * m22
* @return this quaternion for chaining
*/
public Quaternion fromRotationMatrix(final double m00, final double m01, final double m02, final double m10,
@@ -559,6 +583,7 @@ public class Quaternion implements Cloneable, Savable, Externalizable, ReadOnlyQ
* the angle to rotate (in radians).
* @param axis
* the axis of rotation (already normalized - unit length).
+ * @return this quaternion for chaining
* @throws NullPointerException
* if axis is null
*/
@@ -763,6 +788,7 @@ public class Quaternion implements Cloneable, Savable, Externalizable, ReadOnlyQ
* Adds this quaternion to another and places the result in the given store.
*
* @param quat
+ * the quaternion
* @param store
* the Quaternion to store the result in. if null, a new one is created.
* @return a quaternion representing the fields of this quaternion added to those of the given quaternion.
@@ -781,6 +807,7 @@ public class Quaternion implements Cloneable, Savable, Externalizable, ReadOnlyQ
* Internally increments the fields of this quaternion with the field values of the given quaternion.
*
* @param quat
+ * the quaternion
* @return this quaternion for chaining
*/
public Quaternion addLocal(final ReadOnlyQuaternion quat) {
@@ -793,6 +820,7 @@ public class Quaternion implements Cloneable, Savable, Externalizable, ReadOnlyQ
/**
* @param quat
+ * the quaternion
* @param store
* the Quaternion to store the result in. if null, a new one is created.
* @return a quaternion representing the fields of this quaternion subtracted from those of the given quaternion.
@@ -811,6 +839,7 @@ public class Quaternion implements Cloneable, Savable, Externalizable, ReadOnlyQ
* Internally decrements the fields of this quaternion by the field values of the given quaternion.
*
* @param quat
+ * the quaternion
* @return this quaternion for chaining.
*/
public Quaternion subtractLocal(final ReadOnlyQuaternion quat) {
@@ -919,9 +948,13 @@ public class Quaternion implements Cloneable, Savable, Externalizable, ReadOnlyQ
* Multiplies this quaternion by the supplied quaternion values. The result is stored locally.
*
* @param qx
+ * the quaternion x value
* @param qy
+ * the quaternion y value
* @param qz
+ * the quaternion z value
* @param qw
+ * the quaternion w value
* @return this quaternion for chaining
*/
public Quaternion multiplyLocal(final double qx, final double qy, final double qz, final double qw) {
@@ -1105,7 +1138,9 @@ public class Quaternion implements Cloneable, Savable, Externalizable, ReadOnlyQ
* amount.
*
* @param endQuat
+ * the end quaternion
* @param changeAmnt
+ * the change amount
* @param store
* the quaternion to store the result in for return. If null, a new quaternion object is created and
* returned.
@@ -1121,7 +1156,9 @@ public class Quaternion implements Cloneable, Savable, Externalizable, ReadOnlyQ
* amount. Stores the results locally in this quaternion.
*
* @param endQuat
+ * the end quaternion
* @param changeAmnt
+ * the change amount
* @return this quaternion for chaining.
*/
public Quaternion slerpLocal(final ReadOnlyQuaternion endQuat, final double changeAmnt) {
@@ -1133,8 +1170,11 @@ public class Quaternion implements Cloneable, Savable, Externalizable, ReadOnlyQ
* Returns the result as a new quaternion.
*
* @param startQuat
+ * the start quaternion
* @param endQuat
+ * the end quaternion
* @param changeAmnt
+ * the change amount
* @param store
* the quaternion to store the result in for return. If null, a new quaternion object is created and
* returned.
@@ -1201,8 +1241,11 @@ public class Quaternion implements Cloneable, Savable, Externalizable, ReadOnlyQ
* Stores the result locally.
*
* @param startQuat
+ * the start quaternion
* @param endQuat
+ * the end quaternion
* @param changeAmnt
+ * the change amount
* @param workQuat
* a Quaternion to use as scratchpad during calculation
* @return this quaternion for chaining.
@@ -1267,8 +1310,11 @@ public class Quaternion implements Cloneable, Savable, Externalizable, ReadOnlyQ
* Stores the result locally.
*
* @param startQuat
+ * the start quaternion
* @param endQuat
+ * the end quaternion
* @param changeAmnt
+ * the change amount
* @return this quaternion for chaining.
* @throws NullPointerException
* if startQuat or endQuat are null.
@@ -1331,9 +1377,13 @@ public class Quaternion implements Cloneable, Savable, Externalizable, ReadOnlyQ
/**
* @param x
+ * the abscissa
* @param y
+ * the ordinate
* @param z
+ * the applicate
* @param w
+ * the w value
* @return the dot product of this quaternion with the given x,y,z and w values.
*/
@Override
@@ -1343,6 +1393,7 @@ public class Quaternion implements Cloneable, Savable, Externalizable, ReadOnlyQ
/**
* @param quat
+ * the quaternion
* @return the dot product of this quaternion with the given quaternion.
*/
@Override
@@ -1492,7 +1543,9 @@ public class Quaternion implements Cloneable, Savable, Externalizable, ReadOnlyQ
* @param in
* ObjectInput
* @throws IOException
+ * if something wrong occurs while reading
* @throws ClassNotFoundException
+ * if a class is not found
*/
@Override
public void readExternal(final ObjectInput in) throws IOException, ClassNotFoundException {
@@ -1508,6 +1561,7 @@ public class Quaternion implements Cloneable, Savable, Externalizable, ReadOnlyQ
* @param out
* ObjectOutput
* @throws IOException
+ * if something wrong occurs while writing
*/
@Override
public void writeExternal(final ObjectOutput out) throws IOException {
diff --git a/ardor3d-math/src/main/java/com/ardor3d/math/Vector2.java b/ardor3d-math/src/main/java/com/ardor3d/math/Vector2.java
index b0a6f8b..c5757a5 100644
--- a/ardor3d-math/src/main/java/com/ardor3d/math/Vector2.java
+++ b/ardor3d-math/src/main/java/com/ardor3d/math/Vector2.java
@@ -80,6 +80,7 @@ public class Vector2 implements Cloneable, Savable, Externalizable, ReadOnlyVect
* Constructs a new vector set to the (x, y) values of the given source vector.
*
* @param src
+ * the vector to copy from
*/
public Vector2(final ReadOnlyVector2 src) {
this(src.getX(), src.getY());
@@ -89,7 +90,9 @@ public class Vector2 implements Cloneable, Savable, Externalizable, ReadOnlyVect
* Constructs a new vector set to (x, y).
*
* @param x
+ * the abscissa
* @param y
+ * the ordinate
*/
public Vector2(final double x, final double y) {
_x = x;
@@ -124,6 +127,7 @@ public class Vector2 implements Cloneable, Savable, Externalizable, ReadOnlyVect
/**
* @param index
+ * the field index
* @return x value if index == 0 or y value if index == 1
* @throws IllegalArgumentException
* if index is not one of 0, 1.
@@ -183,6 +187,7 @@ public class Vector2 implements Cloneable, Savable, Externalizable, ReadOnlyVect
* Sets the first component of this vector to the given double value.
*
* @param x
+ * the abscissa to set
*/
public void setX(final double x) {
_x = x;
@@ -192,6 +197,7 @@ public class Vector2 implements Cloneable, Savable, Externalizable, ReadOnlyVect
* Sets the second component of this vector to the given double value.
*
* @param y
+ * the ordinate to set
*/
public void setY(final double y) {
_y = y;
@@ -201,7 +207,9 @@ public class Vector2 implements Cloneable, Savable, Externalizable, ReadOnlyVect
* Sets the value of this vector to (x, y)
*
* @param x
+ * the abscissa to set
* @param y
+ * the ordinate to set
* @return this vector for chaining
*/
public Vector2 set(final double x, final double y) {
@@ -234,11 +242,12 @@ public class Vector2 implements Cloneable, Savable, Externalizable, ReadOnlyVect
}
/**
- * Adds the given values to those of this vector and returns them in store * @param store the vector to store the
- * result in for return. If null, a new vector object is created and returned. .
+ * Adds the given values to those of this vector and returns them in store
*
* @param x
+ * the x value to add
* @param y
+ * the y value to add
* @param store
* the vector to store the result in for return. If null, a new vector object is created and returned.
* @return (this.x + x, this.y + y)
@@ -257,7 +266,9 @@ public class Vector2 implements Cloneable, Savable, Externalizable, ReadOnlyVect
* Increments the values of this vector with the given x and y values.
*
* @param x
+ * the x value to add
* @param y
+ * the y value to add
* @return this vector for chaining
*/
public Vector2 addLocal(final double x, final double y) {
@@ -268,6 +279,7 @@ public class Vector2 implements Cloneable, Savable, Externalizable, ReadOnlyVect
* Adds the values of the given source vector to those of this vector and returns them in store.
*
* @param source
+ * the source vector
* @param store
* the vector to store the result in for return. If null, a new vector object is created and returned.
* @return (this.x + source.x, this.y + source.y)
@@ -283,6 +295,7 @@ public class Vector2 implements Cloneable, Savable, Externalizable, ReadOnlyVect
* Increments the values of this vector with the x and y values of the given vector.
*
* @param source
+ * the source vector
* @return this vector for chaining
* @throws NullPointerException
* if source is null.
@@ -295,7 +308,9 @@ public class Vector2 implements Cloneable, Savable, Externalizable, ReadOnlyVect
* Subtracts the given values from those of this vector and returns them in store.
*
* @param x
+ * the x value to subtract
* @param y
+ * the y value to subtract
* @param store
* the vector to store the result in for return. If null, a new vector object is created and returned.
* @return (this.x - x, this.y - y)
@@ -314,7 +329,9 @@ public class Vector2 implements Cloneable, Savable, Externalizable, ReadOnlyVect
* Decrements the values of this vector by the given x and y values.
*
* @param x
+ * the x value to subtract
* @param y
+ * the y value to subtract
* @return this vector for chaining
*/
public Vector2 subtractLocal(final double x, final double y) {
@@ -325,6 +342,7 @@ public class Vector2 implements Cloneable, Savable, Externalizable, ReadOnlyVect
* Subtracts the values of the given source vector from those of this vector and returns them in store.
*
* @param source
+ * the source vector
* @param store
* the vector to store the result in for return. If null, a new vector object is created and returned.
* @return (this.x - source.x, this.y - source.y)
@@ -340,6 +358,7 @@ public class Vector2 implements Cloneable, Savable, Externalizable, ReadOnlyVect
* Decrements the values of this vector by the x and y values from the given source vector.
*
* @param source
+ * the source vector
* @return this vector for chaining
* @throws NullPointerException
* if source is null.
@@ -352,6 +371,7 @@ public class Vector2 implements Cloneable, Savable, Externalizable, ReadOnlyVect
* Multiplies the values of this vector by the given scalar value and returns the result in store.
*
* @param scalar
+ * the scalar value
* @param store
* the vector to store the result in for return. If null, a new vector object is created and returned.
* @return a new vector (this.x * scalar, this.y * scalar)
@@ -370,6 +390,7 @@ public class Vector2 implements Cloneable, Savable, Externalizable, ReadOnlyVect
* Internally modifies the values of this vector by multiplying them each by the given scalar value.
*
* @param scalar
+ * the scalar value
* @return this vector for chaining
*/
public Vector2 multiplyLocal(final double scalar) {
@@ -380,6 +401,7 @@ public class Vector2 implements Cloneable, Savable, Externalizable, ReadOnlyVect
* Multiplies the values of this vector by the given scale values and returns the result in store.
*
* @param scale
+ * the scale value
* @param store
* the vector to store the result in for return. If null, a new vector object is created and returned.
* @return a new vector (this.x * scale.x, this.y * scale.y)
@@ -398,6 +420,7 @@ public class Vector2 implements Cloneable, Savable, Externalizable, ReadOnlyVect
* Internally modifies the values of this vector by multiplying them each by the values of the given scale.
*
* @param scale
+ * the scale value
* @return this vector for chaining
*/
public Vector2 multiplyLocal(final ReadOnlyVector2 scale) {
@@ -408,7 +431,9 @@ public class Vector2 implements Cloneable, Savable, Externalizable, ReadOnlyVect
* Multiplies the values of this vector by the given scale values and returns the result in store.
*
* @param x
+ * the x value to multiply
* @param y
+ * the y value to multiply
* @param store
* the vector to store the result in for return. If null, a new vector object is created and returned.
* @return a new vector (this.x * scale.x, this.y * scale.y)
@@ -427,7 +452,9 @@ public class Vector2 implements Cloneable, Savable, Externalizable, ReadOnlyVect
* Internally modifies the values of this vector by multiplying them each by the values of the given scale.
*
* @param x
+ * the x value to multiply
* @param y
+ * the y value to multiply
* @return this vector for chaining
*/
public Vector2 multiplyLocal(final double x, final double y) {
@@ -438,6 +465,7 @@ public class Vector2 implements Cloneable, Savable, Externalizable, ReadOnlyVect
* Divides the values of this vector by the given scalar value and returns the result in store.
*
* @param scalar
+ * the scalar value
* @param store
* the vector to store the result in for return. If null, a new vector object is created and returned.
* @return a new vector (this.x / scalar, this.y / scalar)
@@ -456,6 +484,7 @@ public class Vector2 implements Cloneable, Savable, Externalizable, ReadOnlyVect
* Internally modifies the values of this vector by dividing them each by the given scalar value.
*
* @param scalar
+ * the scalar value
* @return this vector for chaining
* @throws ArithmeticException
* if scalar is 0
@@ -470,6 +499,7 @@ public class Vector2 implements Cloneable, Savable, Externalizable, ReadOnlyVect
* Divides the values of this vector by the given scale values and returns the result in store.
*
* @param scale
+ * the scale value
* @param store
* the vector to store the result in for return. If null, a new vector object is created and returned.
* @return a new vector (this.x / scale.x, this.y / scale.y)
@@ -488,6 +518,7 @@ public class Vector2 implements Cloneable, Savable, Externalizable, ReadOnlyVect
* Internally modifies the values of this vector by dividing them each by the values of the given scale.
*
* @param scale
+ * the scale value
* @return this vector for chaining
*/
public Vector2 divideLocal(final ReadOnlyVector2 scale) {
@@ -498,7 +529,9 @@ public class Vector2 implements Cloneable, Savable, Externalizable, ReadOnlyVect
* Divides the values of this vector by the given scale values and returns the result in store.
*
* @param x
+ * the x value
* @param y
+ * the y value
* @param store
* the vector to store the result in for return. If null, a new vector object is created and returned.
* @return a new vector (this.x / scale.x, this.y / scale.y)
@@ -517,7 +550,9 @@ public class Vector2 implements Cloneable, Savable, Externalizable, ReadOnlyVect
* Internally modifies the values of this vector by dividing them each by the values of the given scale.
*
* @param x
+ * the x value
* @param y
+ * the y value
* @return this vector for chaining
*/
public Vector2 divideLocal(final double x, final double y) {
@@ -665,7 +700,9 @@ public class Vector2 implements Cloneable, Savable, Externalizable, ReadOnlyVect
* it is closer to 1, the result will be closer to the end value. The result is returned as a new vector object.
*
* @param endVec
+ * the end vector
* @param scalar
+ * the scalar value
* @param store
* the vector to store the result in for return. If null, a new vector object is created and returned.
* @return a new vector as described above.
@@ -690,7 +727,9 @@ public class Vector2 implements Cloneable, Savable, Externalizable, ReadOnlyVect
* it is closer to 1, the result will be closer to the end value. The result is stored back in this vector.
*
* @param endVec
+ * the end vector
* @param scalar
+ * the scalar value
* @return this vector for chaining
* @throws NullPointerException
* if endVec is null.
@@ -707,7 +746,9 @@ public class Vector2 implements Cloneable, Savable, Externalizable, ReadOnlyVect
* result will be closer to the end value. The result is returned as a new vector object.
*
* @param beginVec
+ * the begin vector
* @param endVec
+ * the end vector
* @param scalar
* the scalar as a percent.
* @param store
@@ -734,8 +775,10 @@ public class Vector2 implements Cloneable, Savable, Externalizable, ReadOnlyVect
* result will be closer to the end value. The result is stored back in this vector.
*
* @param beginVec
+ * the begin vector
* @param endVec
- * @param changeAmnt
+ * the end vector
+ * @param scalar
* the scalar as a percent.
* @return this vector for chaining
* @throws NullPointerException
@@ -766,7 +809,9 @@ public class Vector2 implements Cloneable, Savable, Externalizable, ReadOnlyVect
/**
* @param x
+ * the x value
* @param y
+ * the y value
* @return the squared distance between the point described by this vector and the given x, y point. When comparing
* the relative distance between two points it is usually sufficient to compare the squared distances, thus
* avoiding an expensive square root operation.
@@ -780,6 +825,7 @@ public class Vector2 implements Cloneable, Savable, Externalizable, ReadOnlyVect
/**
* @param destination
+ * the destination
* @return the squared distance between the point described by this vector and the given destination point. When
* comparing the relative distance between two points it is usually sufficient to compare the squared
* distances, thus avoiding an expensive square root operation.
@@ -793,7 +839,9 @@ public class Vector2 implements Cloneable, Savable, Externalizable, ReadOnlyVect
/**
* @param x
+ * the x value
* @param y
+ * the y value
* @return the distance between the point described by this vector and the given x, y point.
*/
@Override
@@ -803,6 +851,7 @@ public class Vector2 implements Cloneable, Savable, Externalizable, ReadOnlyVect
/**
* @param destination
+ * the destination
* @return the distance between the point described by this vector and the given destination point.
* @throws NullPointerException
* if destination is null.
@@ -814,7 +863,9 @@ public class Vector2 implements Cloneable, Savable, Externalizable, ReadOnlyVect
/**
* @param x
+ * the x value
* @param y
+ * the y value
* @return the dot product of this vector with the given x, y values.
*/
@Override
@@ -824,6 +875,7 @@ public class Vector2 implements Cloneable, Savable, Externalizable, ReadOnlyVect
/**
* @param vec
+ * the vector
* @return the dot product of this vector with the x, y values of the given vector.
* @throws NullPointerException
* if vec is null.
@@ -965,7 +1017,9 @@ public class Vector2 implements Cloneable, Savable, Externalizable, ReadOnlyVect
* @param in
* ObjectInput
* @throws IOException
+ * if something wrong occurs while reading
* @throws ClassNotFoundException
+ * if a class is not found
*/
@Override
public void readExternal(final ObjectInput in) throws IOException, ClassNotFoundException {
@@ -979,6 +1033,7 @@ public class Vector2 implements Cloneable, Savable, Externalizable, ReadOnlyVect
* @param out
* ObjectOutput
* @throws IOException
+ * if something wrong occurs while writing
*/
@Override
public void writeExternal(final ObjectOutput out) throws IOException {
diff --git a/ardor3d-math/src/main/java/com/ardor3d/math/Vector3.java b/ardor3d-math/src/main/java/com/ardor3d/math/Vector3.java
index 1f5f108..403307b 100644
--- a/ardor3d-math/src/main/java/com/ardor3d/math/Vector3.java
+++ b/ardor3d-math/src/main/java/com/ardor3d/math/Vector3.java
@@ -469,7 +469,8 @@ public class Vector3 implements Cloneable, Savable, Externalizable, ReadOnlyVect
/**
* Internally modifies the values of this vector by multiplying them each by the given scale values.
*
- * @param scalar
+ * @param scale
+ * the scale value
* @return this vector for chaining
*/
public Vector3 multiplyLocal(final ReadOnlyVector3 scale) {
@@ -773,12 +774,12 @@ public class Vector3 implements Cloneable, Savable, Externalizable, ReadOnlyVect
/**
* Performs a linear interpolation between the given begin and end vectors, using the given scalar as a percent.
- * iow, if changeAmnt is closer to 0, the result will be closer to the begin value and if it is closer to 1, the
- * result will be closer to the end value. The result is stored back in this vector.
+ * iow, if scalar is closer to 0, the result will be closer to the begin value and if it is closer to 1, the result
+ * will be closer to the end value. The result is stored back in this vector.
*
* @param beginVec
* @param endVec
- * @param changeAmnt
+ * @param scalar
* the scalar as a percent.
* @return this vector for chaining
* @throws NullPointerException
diff --git a/ardor3d-math/src/main/java/com/ardor3d/math/Vector4.java b/ardor3d-math/src/main/java/com/ardor3d/math/Vector4.java
index d62eac7..642c4c9 100644
--- a/ardor3d-math/src/main/java/com/ardor3d/math/Vector4.java
+++ b/ardor3d-math/src/main/java/com/ardor3d/math/Vector4.java
@@ -805,12 +805,12 @@ public class Vector4 implements Cloneable, Savable, Externalizable, ReadOnlyVect
/**
* Performs a linear interpolation between the given begin and end vectors, using the given scalar as a percent.
- * iow, if changeAmnt is closer to 0, the result will be closer to the begin value and if it is closer to 1, the
- * result will be closer to the end value. The result is stored back in this vector.
+ * iow, if scalar is closer to 0, the result will be closer to the begin value and if it is closer to 1, the result
+ * will be closer to the end value. The result is stored back in this vector.
*
* @param beginVec
* @param endVec
- * @param changeAmnt
+ * @param scalar
* the scalar as a percent.
* @return this vector for chaining
*
diff --git a/ardor3d-math/src/main/java/com/ardor3d/math/functions/ArchimedeanSpiralFunction3D.java b/ardor3d-math/src/main/java/com/ardor3d/math/functions/ArchimedeanSpiralFunction3D.java
index 964cb83..3580161 100644
--- a/ardor3d-math/src/main/java/com/ardor3d/math/functions/ArchimedeanSpiralFunction3D.java
+++ b/ardor3d-math/src/main/java/com/ardor3d/math/functions/ArchimedeanSpiralFunction3D.java
@@ -3,7 +3,7 @@
*
* This file is part of Ardor3D.
*
- * Ardor3D is free software: you can redistribute it and/or modify it
+ * Ardor3D is free software: you can redistribute it and/or modify it
* under the terms of its license which may be found in the accompanying
* LICENSE file or at <http://www.ardor3d.com/LICENSE>.
*/
@@ -14,34 +14,34 @@ import com.ardor3d.math.MathUtils;
/**
* An implementation of an Archimedean spiral which supports any number of spiral arms and optional turbulence.
- *
+ *
* @see <a href="http://en.wikipedia.org/wiki/Archimedean_spiral">wikipedia entry</a>
*/
public class ArchimedeanSpiralFunction3D implements Function3D {
private static final int DEFAULT_ROUGHNESS = 1;
private static final double DEFAULT_FREQUENCY = 0.2;
- private static final Function3D DEFAULT_TURBULENCE = new FbmFunction3D(Functions.simplexNoise(), DEFAULT_ROUGHNESS,
- DEFAULT_FREQUENCY, 0.5, 2.0);
+ private static final Function3D DEFAULT_TURBULENCE = new FbmFunction3D(Functions.simplexNoise(),
+ ArchimedeanSpiralFunction3D.DEFAULT_ROUGHNESS, ArchimedeanSpiralFunction3D.DEFAULT_FREQUENCY, 0.5, 2.0);
private final int _numArms;
private final Function3D _turbulenceFunction;
/**
* Create the function for the specified number of arms, and optionally use the default turbulence.
- *
+ *
* @param numArms
* The number of arms of the spiral (1 or more).
* @param useDefaultTurbulence
* True if the default turbulence should be used; false for no turbulence.
*/
public ArchimedeanSpiralFunction3D(final int numArms, final boolean useDefaultTurbulence) {
- this(numArms, useDefaultTurbulence ? DEFAULT_TURBULENCE : null);
+ this(numArms, useDefaultTurbulence ? ArchimedeanSpiralFunction3D.DEFAULT_TURBULENCE : null);
}
/**
* Create the function for the specified number of arms, with the specified turbulence.
- *
+ *
* @param numArms
* The number of arms of the spiral (1 or more).
* @param turbulenceFunction
@@ -54,10 +54,13 @@ public class ArchimedeanSpiralFunction3D implements Function3D {
/**
* Evaluate the function.
- *
- * @param x the abscissa
- * @param y the ordinate
- * @param z the applicate
+ *
+ * @param x
+ * the abscissa
+ * @param y
+ * the ordinate
+ * @param z
+ * the applicate
*
* @return A result which is generally, but not always, in the -1 to 1 range.
*/
diff --git a/ardor3d-math/src/main/java/com/ardor3d/math/functions/BrickGridFunction3D.java b/ardor3d-math/src/main/java/com/ardor3d/math/functions/BrickGridFunction3D.java
index bd910fe..39d966d 100644
--- a/ardor3d-math/src/main/java/com/ardor3d/math/functions/BrickGridFunction3D.java
+++ b/ardor3d-math/src/main/java/com/ardor3d/math/functions/BrickGridFunction3D.java
@@ -3,7 +3,7 @@
*
* This file is part of Ardor3D.
*
- * Ardor3D is free software: you can redistribute it and/or modify it
+ * Ardor3D is free software: you can redistribute it and/or modify it
* under the terms of its license which may be found in the accompanying
* LICENSE file or at <http://www.ardor3d.com/LICENSE>.
*/
@@ -14,7 +14,7 @@ import com.ardor3d.math.MathUtils;
/**
* Creates a brick-like pattern in the XY plane. This is not really 3D, since it ignores the z factor.
- *
+ *
* The brick and mortar values returned by this function can (and do by default) have some amount of variation for
* visual interest. The specified variation represents a maximum -- actual variation is determined randomly within this
* maximum variation. Since actual variation is determined randomly, the brick and mortar values are likely to change a
@@ -35,13 +35,15 @@ public class BrickGridFunction3D extends GridPatternFunction3D {
* Create a brick pattern using all default values.
*/
public BrickGridFunction3D() {
- this(DEFAULT_BRICK_LENGTH, DEFAULT_BRICK_HEIGHT, DEFAULT_MORTAR_THICKNESS, DEFAULT_BRICK_VALUE,
- DEFAULT_MORTAR_VALUE, DEFAULT_BRICK_VARIATION, DEFAULT_MORTAR_VARIATION);
+ this(BrickGridFunction3D.DEFAULT_BRICK_LENGTH, BrickGridFunction3D.DEFAULT_BRICK_HEIGHT,
+ BrickGridFunction3D.DEFAULT_MORTAR_THICKNESS, BrickGridFunction3D.DEFAULT_BRICK_VALUE,
+ BrickGridFunction3D.DEFAULT_MORTAR_VALUE, BrickGridFunction3D.DEFAULT_BRICK_VARIATION,
+ BrickGridFunction3D.DEFAULT_MORTAR_VARIATION);
}
/**
* Create a brick pattern with values specified by the caller.
- *
+ *
* @param brickLength
* The number of grid cells used for the length of a brick (default 12).
* @param brickHeight