aboutsummaryrefslogtreecommitdiffstats
path: root/ardor3d-math/src
diff options
context:
space:
mode:
authorJulien Gouesse <[email protected]>2014-08-08 22:02:24 +0200
committerJulien Gouesse <[email protected]>2014-08-08 22:02:24 +0200
commitd8553c06068332a2e604f1336238e5cdf12c762c (patch)
treecbd1b37833a82868bd30621ba1cf053f2853c6ed /ardor3d-math/src
parent2835439b704b945e3121b5a9f17d207bc5b2c5ea (diff)
Removes tons of warnings
Diffstat (limited to 'ardor3d-math/src')
-rw-r--r--ardor3d-math/src/main/java/com/ardor3d/math/Line3.java1
-rw-r--r--ardor3d-math/src/main/java/com/ardor3d/math/Line3Base.java5
-rw-r--r--ardor3d-math/src/main/java/com/ardor3d/math/functions/ArchimedeanSpiralFunction3D.java1
-rw-r--r--ardor3d-math/src/main/java/com/ardor3d/math/functions/CheckerFunction3D.java1
-rw-r--r--ardor3d-math/src/main/java/com/ardor3d/math/functions/CylinderFunction3D.java1
-rw-r--r--ardor3d-math/src/main/java/com/ardor3d/math/functions/FbmFunction3D.java1
-rw-r--r--ardor3d-math/src/main/java/com/ardor3d/math/functions/Functions.java15
-rw-r--r--ardor3d-math/src/main/java/com/ardor3d/math/functions/GridPatternFunction3D.java1
-rw-r--r--ardor3d-math/src/main/java/com/ardor3d/math/functions/MandelbrotFunction3D.java1
-rw-r--r--ardor3d-math/src/main/java/com/ardor3d/math/functions/MapperFunction3D.java1
-rw-r--r--ardor3d-math/src/main/java/com/ardor3d/math/functions/MeshFunction3D.java1
-rw-r--r--ardor3d-math/src/main/java/com/ardor3d/math/functions/RidgeFunction3D.java1
-rw-r--r--ardor3d-math/src/main/java/com/ardor3d/math/functions/TurbulenceFunction3D.java1
-rw-r--r--ardor3d-math/src/main/java/com/ardor3d/math/functions/VoroniFunction3D.java1
14 files changed, 32 insertions, 0 deletions
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 453f48a..ca8d6cc 100644
--- a/ardor3d-math/src/main/java/com/ardor3d/math/Line3.java
+++ b/ardor3d-math/src/main/java/com/ardor3d/math/Line3.java
@@ -69,6 +69,7 @@ public class Line3 extends Line3Base implements ReadOnlyLine3, Poolable {
* @throws NullPointerException
* if the point is null.
*/
+ @Override
public double distanceSquared(final ReadOnlyVector3 point, final Vector3 store) {
final Vector3 vectorA = Vector3.fetchTempInstance();
vectorA.set(point).subtractLocal(_origin);
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 6b6e5f7..409268a 100644
--- a/ardor3d-math/src/main/java/com/ardor3d/math/Line3Base.java
+++ b/ardor3d-math/src/main/java/com/ardor3d/math/Line3Base.java
@@ -84,15 +84,18 @@ public abstract class Line3Base implements Savable, Externalizable {
// Methods for Savable
// /////////////////
+ @Override
public Class<? extends Line3Base> getClassTag() {
return this.getClass();
}
+ @Override
public void write(final OutputCapsule capsule) throws IOException {
capsule.write(_origin, "origin", new Vector3(Vector3.ZERO));
capsule.write(_direction, "direction", new Vector3(Vector3.UNIT_Z));
}
+ @Override
public void read(final InputCapsule capsule) throws IOException {
_origin.set((Vector3) capsule.readSavable("origin", new Vector3(Vector3.ZERO)));
_direction.set((Vector3) capsule.readSavable("direction", new Vector3(Vector3.UNIT_Z)));
@@ -110,6 +113,7 @@ public abstract class Line3Base implements Savable, Externalizable {
* @throws IOException
* @throws ClassNotFoundException
*/
+ @Override
public void readExternal(final ObjectInput in) throws IOException, ClassNotFoundException {
setOrigin((Vector3) in.readObject());
setDirection((Vector3) in.readObject());
@@ -122,6 +126,7 @@ public abstract class Line3Base implements Savable, Externalizable {
* ObjectOutput
* @throws IOException
*/
+ @Override
public void writeExternal(final ObjectOutput out) throws IOException {
out.writeObject(_origin);
out.writeObject(_direction);
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 c2952c5..23b3fe6 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
@@ -57,6 +57,7 @@ public class ArchimedeanSpiralFunction3D implements Function3D {
*
* @return A result which is generally, but not always, in the -1 to 1 range.
*/
+ @Override
public double eval(final double x, final double y, final double z) {
final double radius = Math.sqrt(x * x + y * y);
diff --git a/ardor3d-math/src/main/java/com/ardor3d/math/functions/CheckerFunction3D.java b/ardor3d-math/src/main/java/com/ardor3d/math/functions/CheckerFunction3D.java
index b782051..6ba1916 100644
--- a/ardor3d-math/src/main/java/com/ardor3d/math/functions/CheckerFunction3D.java
+++ b/ardor3d-math/src/main/java/com/ardor3d/math/functions/CheckerFunction3D.java
@@ -17,6 +17,7 @@ import com.ardor3d.math.MathUtils;
*/
public class CheckerFunction3D implements Function3D {
+ @Override
public double eval(final double x, final double y, final double z) {
if ((MathUtils.floor(x) + MathUtils.floor(y) + MathUtils.floor(z)) % 2 == 0) {
return -1;
diff --git a/ardor3d-math/src/main/java/com/ardor3d/math/functions/CylinderFunction3D.java b/ardor3d-math/src/main/java/com/ardor3d/math/functions/CylinderFunction3D.java
index 6ec23b0..0fbfa60 100644
--- a/ardor3d-math/src/main/java/com/ardor3d/math/functions/CylinderFunction3D.java
+++ b/ardor3d-math/src/main/java/com/ardor3d/math/functions/CylinderFunction3D.java
@@ -30,6 +30,7 @@ public class CylinderFunction3D implements Function3D {
setFrequency(frequency);
}
+ @Override
public double eval(final double x, final double y, final double z) {
final double dx = x * _frequency;
final double dz = z * _frequency;
diff --git a/ardor3d-math/src/main/java/com/ardor3d/math/functions/FbmFunction3D.java b/ardor3d-math/src/main/java/com/ardor3d/math/functions/FbmFunction3D.java
index 7aa48b4..3fbd641 100644
--- a/ardor3d-math/src/main/java/com/ardor3d/math/functions/FbmFunction3D.java
+++ b/ardor3d-math/src/main/java/com/ardor3d/math/functions/FbmFunction3D.java
@@ -54,6 +54,7 @@ public class FbmFunction3D implements Function3D {
_lacunarity = lacunarity;
}
+ @Override
public double eval(final double x, final double y, final double z) {
double sum = 0;
double dx = x * _frequency, dy = y * _frequency, dz = z * _frequency;
diff --git a/ardor3d-math/src/main/java/com/ardor3d/math/functions/Functions.java b/ardor3d-math/src/main/java/com/ardor3d/math/functions/Functions.java
index b0ba25d..86e11a7 100644
--- a/ardor3d-math/src/main/java/com/ardor3d/math/functions/Functions.java
+++ b/ardor3d-math/src/main/java/com/ardor3d/math/functions/Functions.java
@@ -25,6 +25,7 @@ public class Functions {
*/
public static Function3D constant(final double constant) {
return new Function3D() {
+ @Override
public double eval(final double x, final double y, final double z) {
return constant;
}
@@ -39,6 +40,7 @@ public class Functions {
*/
public static Function3D scaleBias(final Function3D source, final double scale, final double bias) {
return new Function3D() {
+ @Override
public double eval(final double x, final double y, final double z) {
return source.eval(x, y, z) * scale + bias;
}
@@ -51,6 +53,7 @@ public class Functions {
*/
public static Function3D abs(final Function3D source) {
return new Function3D() {
+ @Override
public double eval(final double x, final double y, final double z) {
return Math.abs(source.eval(x, y, z));
}
@@ -65,6 +68,7 @@ public class Functions {
*/
public static Function3D clamp(final Function3D source, final double min, final double max) {
return new Function3D() {
+ @Override
public double eval(final double x, final double y, final double z) {
return MathUtils.clamp(source.eval(x, y, z), min, max);
}
@@ -77,6 +81,7 @@ public class Functions {
*/
public static Function3D invert(final Function3D source) {
return new Function3D() {
+ @Override
public double eval(final double x, final double y, final double z) {
return -source.eval(x, y, z);
}
@@ -90,6 +95,7 @@ public class Functions {
*/
public static Function3D add(final Function3D sourceA, final Function3D sourceB) {
return new Function3D() {
+ @Override
public double eval(final double x, final double y, final double z) {
return sourceA.eval(x, y, z) + sourceB.eval(x, y, z);
}
@@ -103,6 +109,7 @@ public class Functions {
*/
public static Function3D multiply(final Function3D sourceA, final Function3D sourceB) {
return new Function3D() {
+ @Override
public double eval(final double x, final double y, final double z) {
return sourceA.eval(x, y, z) * sourceB.eval(x, y, z);
}
@@ -116,6 +123,7 @@ public class Functions {
*/
public static Function3D min(final Function3D sourceA, final Function3D sourceB) {
return new Function3D() {
+ @Override
public double eval(final double x, final double y, final double z) {
return Math.min(sourceA.eval(x, y, z), sourceB.eval(x, y, z));
}
@@ -129,6 +137,7 @@ public class Functions {
*/
public static Function3D max(final Function3D sourceA, final Function3D sourceB) {
return new Function3D() {
+ @Override
public double eval(final double x, final double y, final double z) {
return Math.max(sourceA.eval(x, y, z), sourceB.eval(x, y, z));
}
@@ -145,6 +154,7 @@ public class Functions {
*/
public static Function3D lerp(final Function3D sourceA, final Function3D sourceB, final double amount) {
return new Function3D() {
+ @Override
public double eval(final double x, final double y, final double z) {
return MathUtils.lerp(amount, sourceA.eval(x, y, z), sourceB.eval(x, y, z));
}
@@ -159,6 +169,7 @@ public class Functions {
*/
public static Function3D rotateInput(final Function3D source, final ReadOnlyMatrix3 rotation) {
return new Function3D() {
+ @Override
public double eval(final double x, final double y, final double z) {
final Vector3 temp = Vector3.fetchTempInstance();
temp.set(x, y, z);
@@ -180,6 +191,7 @@ public class Functions {
public static Function3D scaleInput(final Function3D source, final double scaleX, final double scaleY,
final double scaleZ) {
return new Function3D() {
+ @Override
public double eval(final double x, final double y, final double z) {
return source.eval(x * scaleX, y * scaleY, z * scaleZ);
}
@@ -196,6 +208,7 @@ public class Functions {
public static Function3D translateInput(final Function3D source, final double transX, final double transY,
final double transZ) {
return new Function3D() {
+ @Override
public double eval(final double x, final double y, final double z) {
return source.eval(x + transX, y + transY, z + transZ);
}
@@ -213,6 +226,7 @@ public class Functions {
public static Function3D remap(final Function3D source, final double oldLow, final double oldHigh,
final double newLow, final double newHigh) {
return new Function3D() {
+ @Override
public double eval(final double x, final double y, final double z) {
double val = source.eval(x, y, z);
// Zero out old domain
@@ -233,6 +247,7 @@ public class Functions {
return new Function3D() {
SimplexNoise noiseGenerator = new SimplexNoise();
+ @Override
public double eval(final double x, final double y, final double z) {
return noiseGenerator.noise(x, y, z);
}
diff --git a/ardor3d-math/src/main/java/com/ardor3d/math/functions/GridPatternFunction3D.java b/ardor3d-math/src/main/java/com/ardor3d/math/functions/GridPatternFunction3D.java
index 1d74d00..8cbf487 100644
--- a/ardor3d-math/src/main/java/com/ardor3d/math/functions/GridPatternFunction3D.java
+++ b/ardor3d-math/src/main/java/com/ardor3d/math/functions/GridPatternFunction3D.java
@@ -51,6 +51,7 @@ public class GridPatternFunction3D implements Function3D {
*
* @return
*/
+ @Override
public double eval(double x, double y, final double z) {
x = Math.abs(x);
y = Math.abs(y);
diff --git a/ardor3d-math/src/main/java/com/ardor3d/math/functions/MandelbrotFunction3D.java b/ardor3d-math/src/main/java/com/ardor3d/math/functions/MandelbrotFunction3D.java
index d81c105..9881511 100644
--- a/ardor3d-math/src/main/java/com/ardor3d/math/functions/MandelbrotFunction3D.java
+++ b/ardor3d-math/src/main/java/com/ardor3d/math/functions/MandelbrotFunction3D.java
@@ -23,6 +23,7 @@ public class MandelbrotFunction3D implements Function3D {
setIterations(iterations);
}
+ @Override
public double eval(final double x, final double y, final double z) {
double dx = 0;
double dy = 0;
diff --git a/ardor3d-math/src/main/java/com/ardor3d/math/functions/MapperFunction3D.java b/ardor3d-math/src/main/java/com/ardor3d/math/functions/MapperFunction3D.java
index 5502f7f..1a64086 100644
--- a/ardor3d-math/src/main/java/com/ardor3d/math/functions/MapperFunction3D.java
+++ b/ardor3d-math/src/main/java/com/ardor3d/math/functions/MapperFunction3D.java
@@ -38,6 +38,7 @@ public class MapperFunction3D implements Function3D {
_domainEnd = domainEnd;
}
+ @Override
public double eval(final double x, final double y, final double z) {
// grab a value from our map function.
final double mappingValue = MathUtils.clamp(_mapFunction.eval(x, y, z), _domainStart, _domainEnd);
diff --git a/ardor3d-math/src/main/java/com/ardor3d/math/functions/MeshFunction3D.java b/ardor3d-math/src/main/java/com/ardor3d/math/functions/MeshFunction3D.java
index e399d95..aa34bcc 100644
--- a/ardor3d-math/src/main/java/com/ardor3d/math/functions/MeshFunction3D.java
+++ b/ardor3d-math/src/main/java/com/ardor3d/math/functions/MeshFunction3D.java
@@ -38,6 +38,7 @@ public class MeshFunction3D implements Function3D {
/**
* Evaluate the function.
*/
+ @Override
public double eval(final double x, final double y, final double z) {
final double value = (Math.sin(x) + Math.sin(y) + Math.sin(z)) / _lineSize;
return ((value * value) * 2.0) - 1.0;
diff --git a/ardor3d-math/src/main/java/com/ardor3d/math/functions/RidgeFunction3D.java b/ardor3d-math/src/main/java/com/ardor3d/math/functions/RidgeFunction3D.java
index 669c09b..9c2b071 100644
--- a/ardor3d-math/src/main/java/com/ardor3d/math/functions/RidgeFunction3D.java
+++ b/ardor3d-math/src/main/java/com/ardor3d/math/functions/RidgeFunction3D.java
@@ -44,6 +44,7 @@ public class RidgeFunction3D implements Function3D {
updateWeights();
}
+ @Override
public double eval(final double x, final double y, final double z) {
double value = 0, signal = 0, weight = 1;
double dx = x * _frequency, dy = y * _frequency, dz = z * _frequency;
diff --git a/ardor3d-math/src/main/java/com/ardor3d/math/functions/TurbulenceFunction3D.java b/ardor3d-math/src/main/java/com/ardor3d/math/functions/TurbulenceFunction3D.java
index be32008..d249304 100644
--- a/ardor3d-math/src/main/java/com/ardor3d/math/functions/TurbulenceFunction3D.java
+++ b/ardor3d-math/src/main/java/com/ardor3d/math/functions/TurbulenceFunction3D.java
@@ -40,6 +40,7 @@ public class TurbulenceFunction3D implements Function3D {
_distortModule = new FbmFunction3D(Functions.simplexNoise(), roughness, frequency, 0.5, 2.0);
}
+ @Override
public double eval(final double x, final double y, final double z) {
// tweak the incoming x, y, and z with some magic numbers to prevent singularities as integer boundaries.
final double x0 = x + .1985;
diff --git a/ardor3d-math/src/main/java/com/ardor3d/math/functions/VoroniFunction3D.java b/ardor3d-math/src/main/java/com/ardor3d/math/functions/VoroniFunction3D.java
index f17ba34..149db66 100644
--- a/ardor3d-math/src/main/java/com/ardor3d/math/functions/VoroniFunction3D.java
+++ b/ardor3d-math/src/main/java/com/ardor3d/math/functions/VoroniFunction3D.java
@@ -58,6 +58,7 @@ public class VoroniFunction3D implements Function3D {
_seed = seed;
}
+ @Override
public double eval(final double x, final double y, final double z) {
final double dx = x * _frequency, dy = y * _frequency, dz = z * _frequency;