diff --git a/engine/src/core/com/jme3/app/state/package.html b/engine/src/core/com/jme3/app/state/package.html new file mode 100644 index 000000000..0e93b3880 --- /dev/null +++ b/engine/src/core/com/jme3/app/state/package.html @@ -0,0 +1,15 @@ + + + +
+com.jme3.app.state
package provides
+{@link com.jme3.app.state.AppState app states},
+an abstract way of handling application logic.
+
+
+
diff --git a/engine/src/core/com/jme3/input/controls/package.html b/engine/src/core/com/jme3/input/controls/package.html
new file mode 100644
index 000000000..2303ea91a
--- /dev/null
+++ b/engine/src/core/com/jme3/input/controls/package.html
@@ -0,0 +1,19 @@
+
+
+
+
+com.jme3.input.controls
package allows user code to listen
+to input events regardless of the type of input used.
++Users will receive input in one of two forms, either +{@link com.jme3.input.controls.AnalogListener analog input} or +{@link com.jme3.input.controls.Action digital/action input}. + + + + diff --git a/engine/src/core/com/jme3/input/dummy/package.html b/engine/src/core/com/jme3/input/dummy/package.html new file mode 100644 index 000000000..13f5c5507 --- /dev/null +++ b/engine/src/core/com/jme3/input/dummy/package.html @@ -0,0 +1,14 @@ + + + +
+com.jme3.input.dummy
package provides "dummy" or "null"
+implementations of the input interfaces.
+
+
+
diff --git a/engine/src/core/com/jme3/input/event/package.html b/engine/src/core/com/jme3/input/event/package.html
new file mode 100644
index 000000000..eaa96fb33
--- /dev/null
+++ b/engine/src/core/com/jme3/input/event/package.html
@@ -0,0 +1,13 @@
+
+
+
+
+com.jme3.input.event
package contains low-level input events.
+
+
+
diff --git a/engine/src/core/com/jme3/math/Eigen3f.java b/engine/src/core/com/jme3/math/Eigen3f.java
index 9145e4f5c..c1ef667de 100644
--- a/engine/src/core/com/jme3/math/Eigen3f.java
+++ b/engine/src/core/com/jme3/math/Eigen3f.java
@@ -32,6 +32,7 @@
package com.jme3.math;
+import java.util.logging.Level;
import java.util.logging.Logger;
public class Eigen3f {
@@ -381,7 +382,7 @@ public class Eigen3f {
logger.info("eigenvalues = ");
for (int i = 0; i < 3; i++)
- logger.info(eigenSystem.getEigenValue(i) + " ");
+ logger.log(Level.INFO, "{0} ", eigenSystem.getEigenValue(i));
logger.info("eigenvectors = ");
for (int i = 0; i < 3; i++) {
diff --git a/engine/src/core/com/jme3/math/package.html b/engine/src/core/com/jme3/math/package.html
new file mode 100644
index 000000000..64da8aaa6
--- /dev/null
+++ b/engine/src/core/com/jme3/math/package.html
@@ -0,0 +1,53 @@
+
+
+
+
+com.jme3.math
package provides mathematic data structures
+and utilities which are used by the rest of the engine.
+The math package provides the following classes:com.jme3.post
package provides utilities for
+render processing.
++The {@link com.jme3.post.SceneProcessor} interface is used as the base interface +for all render processing. The SceneProcessor contains hooks for various rendering +events. +
+One use of render processing is post-processing, which is applying effects
+on an already-rendered scene. The engine's post-processing system is implemented
+in the {@link com.jme3.post.FilterPostProcessor} class, which contains a list
+of {@link com.jme3.post.Filter filters}. Each are invoked in order to apply
+various effects on the rendered scene.
+
+
+
diff --git a/engine/src/core/com/jme3/renderer/Renderer.java b/engine/src/core/com/jme3/renderer/Renderer.java
index 83ca85649..25d55fc9c 100644
--- a/engine/src/core/com/jme3/renderer/Renderer.java
+++ b/engine/src/core/com/jme3/renderer/Renderer.java
@@ -45,15 +45,22 @@ import com.jme3.texture.Texture;
import java.nio.ByteBuffer;
import java.util.EnumSet;
+/**
+ * The
+ * The
+The most critical classes are the {@link com.jme3.renderer.Renderer},
+which is the low-level rendering implementation and is abstract, and the
+{@link com.jme3.renderer.RenderManager} class, which provides the high-level
+rendering logic on top of the
+To accompany rendering, several helper classes are available.
+Renderer
is responsible for taking rendering commands and
+ * executing them on the underlying video hardware.
+ *
+ * @author Kirill Vainer
+ */
public interface Renderer {
/**
+ * Get the capabilities of the renderer.
* @return The capabilities of the renderer.
*/
public EnumSetRendererException
is raised when a renderer encounters
+ * a fatal rendering error.
+ *
+ * @author Kirill Vainer
+ */
public class RendererException extends RuntimeException {
+
+ /**
+ * Creates a new isntance of RendererException
+ */
public RendererException(String message){
super(message);
}
diff --git a/engine/src/core/com/jme3/renderer/Statistics.java b/engine/src/core/com/jme3/renderer/Statistics.java
index e31129364..015b3765a 100644
--- a/engine/src/core/com/jme3/renderer/Statistics.java
+++ b/engine/src/core/com/jme3/renderer/Statistics.java
@@ -38,6 +38,13 @@ import com.jme3.texture.FrameBuffer;
import com.jme3.texture.Image;
import java.util.HashSet;
+/**
+ * The statistics class allows tracking of real-time rendering statistics.
+ * Statistics
can be retrieved by using {@link Renderer#getStatistics() }.
+ *
+ * @author Kirill Vainer
+ */
public class Statistics {
protected int numObjects;
@@ -56,6 +63,13 @@ public class Statistics {
protected HashSetcom.jme3.renderer
package provides classes responsible for
+rendering.
+Renderer
.
+
+
+
+
+
diff --git a/engine/src/desktop-fx/com/jme3/shadow/BasicShadowRenderer.java b/engine/src/desktop-fx/com/jme3/shadow/BasicShadowRenderer.java
index 92d28212f..8ea500891 100644
--- a/engine/src/desktop-fx/com/jme3/shadow/BasicShadowRenderer.java
+++ b/engine/src/desktop-fx/com/jme3/shadow/BasicShadowRenderer.java
@@ -140,7 +140,7 @@ public class BasicShadowRenderer implements SceneProcessor {
shadowCam.setParallelProjection(true);
// shadowCam.setFrustumPerspective(45, 1, 1, 20);
- shadowCam.setDirection(direction);
+ shadowCam.lookAtDirection(direction, Vector3f.UNIT_Y);
shadowCam.update();
shadowCam.setLocation(frustaCenter);
shadowCam.update();
diff --git a/engine/src/desktop-fx/com/jme3/shadow/ShadowCamera.java b/engine/src/desktop-fx/com/jme3/shadow/ShadowCamera.java
index 8966dadd6..9eba5e666 100644
--- a/engine/src/desktop-fx/com/jme3/shadow/ShadowCamera.java
+++ b/engine/src/desktop-fx/com/jme3/shadow/ShadowCamera.java
@@ -58,7 +58,7 @@ public class ShadowCamera {
DirectionalLight dl = (DirectionalLight) target;
lightCam.setParallelProjection(true);
lightCam.setLocation(Vector3f.ZERO);
- lightCam.setDirection(dl.getDirection());
+ lightCam.lookAtDirection(dl.getDirection(), Vector3f.UNIT_Y );
lightCam.setFrustum(-1, 1, -1, 1, 1, -1);
}else{
PointLight pl = (PointLight) target;
diff --git a/engine/src/terrain/com/jme3/terrain/heightmap/ImageBasedHeightMapGrid.java b/engine/src/terrain/com/jme3/terrain/heightmap/ImageBasedHeightMapGrid.java
index 91e444c98..42dbed82c 100644
--- a/engine/src/terrain/com/jme3/terrain/heightmap/ImageBasedHeightMapGrid.java
+++ b/engine/src/terrain/com/jme3/terrain/heightmap/ImageBasedHeightMapGrid.java
@@ -4,18 +4,17 @@
*/
package com.jme3.terrain.heightmap;
+import com.jme3.asset.AssetInfo;
+import com.jme3.asset.AssetKey;
import com.jme3.asset.AssetManager;
import com.jme3.asset.AssetNotFoundException;
-import com.jme3.math.FastMath;
import com.jme3.math.Vector3f;
-import com.jme3.texture.Texture;
import java.awt.image.BufferedImage;
import java.io.IOException;
import java.io.InputStream;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.imageio.ImageIO;
-import jme3tools.converters.ImageToAwt;
/**
*
@@ -23,6 +22,7 @@ import jme3tools.converters.ImageToAwt;
*/
public class ImageBasedHeightMapGrid implements HeightMapGrid {
+ private static final Logger logger = Logger.getLogger(ImageBasedHeightMapGrid.class.getName());
private final AssetManager assetManager;
private final Namer namer;
private int size;
@@ -45,17 +45,20 @@ public class ImageBasedHeightMapGrid implements HeightMapGrid {
// HEIGHTMAP image (for the terrain heightmap)
int x = (int) location.x;
int z = (int) location.z;
+
AbstractHeightMap heightmap = null;
+ BufferedImage im = null;
+
try {
String name = namer.getName(x, z);
- Logger.getLogger(ImageBasedHeightMapGrid.class.getCanonicalName()).log(Level.INFO, "Loading heightmap from file: " + name);
- final InputStream stream = Thread.currentThread().getContextClassLoader().getResourceAsStream(name);
- BufferedImage im = null;
- if (stream != null) {
- im = ImageIO.read(stream);
+ logger.log(Level.INFO, "Loading heightmap from file: {0}", name);
+ final AssetInfo assetInfo = assetManager.locateAsset(new AssetKey(name));
+ if (assetInfo != null){
+ InputStream in = assetInfo.openStream();
+ im = ImageIO.read(in);
} else {
im = new BufferedImage(size, size, BufferedImage.TYPE_USHORT_GRAY);
- Logger.getLogger(ImageBasedHeightMapGrid.class.getCanonicalName()).log(Level.WARNING, "File: " + name + " not found, loading zero heightmap instead");
+ logger.log(Level.WARNING, "File: {0} not found, loading zero heightmap instead", name);
}
// CREATE HEIGHTMAP
heightmap = new Grayscale16BitHeightMap(im);
diff --git a/engine/src/test-data/Scenes/ManyLights/AO.dds b/engine/src/test-data/Scenes/ManyLights/AO.dds
deleted file mode 100644
index c5883a43c..000000000
Binary files a/engine/src/test-data/Scenes/ManyLights/AO.dds and /dev/null differ
diff --git a/engine/src/test-data/Scenes/ManyLights/AO.tga b/engine/src/test-data/Scenes/ManyLights/AO.tga
deleted file mode 100644
index 40333503a..000000000
Binary files a/engine/src/test-data/Scenes/ManyLights/AO.tga and /dev/null differ
diff --git a/engine/src/test-data/Textures/Terrain/grid/rock.jpg b/engine/src/test-data/Textures/Terrain/Rock2/rock.jpg
similarity index 100%
rename from engine/src/test-data/Textures/Terrain/grid/rock.jpg
rename to engine/src/test-data/Textures/Terrain/Rock2/rock.jpg
diff --git a/engine/src/test-data/Textures/Terrain/grid/mountains_0_-512.png b/engine/src/test-data/Textures/Terrain/grid/mountains_0_-512.png
deleted file mode 100644
index 341d16bfc..000000000
Binary files a/engine/src/test-data/Textures/Terrain/grid/mountains_0_-512.png and /dev/null differ
diff --git a/engine/src/test-data/Textures/Terrain/grid/mountains_0_0.png b/engine/src/test-data/Textures/Terrain/grid/mountains_0_0.png
deleted file mode 100644
index 16a98d016..000000000
Binary files a/engine/src/test-data/Textures/Terrain/grid/mountains_0_0.png and /dev/null differ
diff --git a/engine/src/test-data/Textures/Terrain/grid/mountains_0_1024.png b/engine/src/test-data/Textures/Terrain/grid/mountains_0_1024.png
deleted file mode 100644
index 24be0101c..000000000
Binary files a/engine/src/test-data/Textures/Terrain/grid/mountains_0_1024.png and /dev/null differ
diff --git a/engine/src/test-data/Textures/Terrain/grid/mountains_0_1536.png b/engine/src/test-data/Textures/Terrain/grid/mountains_0_1536.png
deleted file mode 100644
index d7d60dd85..000000000
Binary files a/engine/src/test-data/Textures/Terrain/grid/mountains_0_1536.png and /dev/null differ
diff --git a/engine/src/test-data/Textures/Terrain/grid/mountains_0_2048.png b/engine/src/test-data/Textures/Terrain/grid/mountains_0_2048.png
deleted file mode 100644
index 8cc3d62ec..000000000
Binary files a/engine/src/test-data/Textures/Terrain/grid/mountains_0_2048.png and /dev/null differ
diff --git a/engine/src/test-data/Textures/Terrain/grid/mountains_0_2560.png b/engine/src/test-data/Textures/Terrain/grid/mountains_0_2560.png
deleted file mode 100644
index df091caa5..000000000
Binary files a/engine/src/test-data/Textures/Terrain/grid/mountains_0_2560.png and /dev/null differ
diff --git a/engine/src/test-data/Textures/Terrain/grid/mountains_0_3072.png b/engine/src/test-data/Textures/Terrain/grid/mountains_0_3072.png
deleted file mode 100644
index 1740006d8..000000000
Binary files a/engine/src/test-data/Textures/Terrain/grid/mountains_0_3072.png and /dev/null differ
diff --git a/engine/src/test-data/Textures/Terrain/grid/mountains_0_512.png b/engine/src/test-data/Textures/Terrain/grid/mountains_0_512.png
deleted file mode 100644
index 25a255307..000000000
Binary files a/engine/src/test-data/Textures/Terrain/grid/mountains_0_512.png and /dev/null differ
diff --git a/engine/src/test-data/Textures/Terrain/grid/mountains_1024_-512.png b/engine/src/test-data/Textures/Terrain/grid/mountains_1024_-512.png
deleted file mode 100644
index f52a981fa..000000000
Binary files a/engine/src/test-data/Textures/Terrain/grid/mountains_1024_-512.png and /dev/null differ
diff --git a/engine/src/test-data/Textures/Terrain/grid/mountains_1024_0.png b/engine/src/test-data/Textures/Terrain/grid/mountains_1024_0.png
deleted file mode 100644
index 51e38b64a..000000000
Binary files a/engine/src/test-data/Textures/Terrain/grid/mountains_1024_0.png and /dev/null differ
diff --git a/engine/src/test-data/Textures/Terrain/grid/mountains_1024_1024.png b/engine/src/test-data/Textures/Terrain/grid/mountains_1024_1024.png
deleted file mode 100644
index 19549b670..000000000
Binary files a/engine/src/test-data/Textures/Terrain/grid/mountains_1024_1024.png and /dev/null differ
diff --git a/engine/src/test-data/Textures/Terrain/grid/mountains_1024_1536.png b/engine/src/test-data/Textures/Terrain/grid/mountains_1024_1536.png
deleted file mode 100644
index c4f1fc528..000000000
Binary files a/engine/src/test-data/Textures/Terrain/grid/mountains_1024_1536.png and /dev/null differ
diff --git a/engine/src/test-data/Textures/Terrain/grid/mountains_1024_2048.png b/engine/src/test-data/Textures/Terrain/grid/mountains_1024_2048.png
deleted file mode 100644
index af7acdea8..000000000
Binary files a/engine/src/test-data/Textures/Terrain/grid/mountains_1024_2048.png and /dev/null differ
diff --git a/engine/src/test-data/Textures/Terrain/grid/mountains_1024_2560.png b/engine/src/test-data/Textures/Terrain/grid/mountains_1024_2560.png
deleted file mode 100644
index 09e468cb8..000000000
Binary files a/engine/src/test-data/Textures/Terrain/grid/mountains_1024_2560.png and /dev/null differ
diff --git a/engine/src/test-data/Textures/Terrain/grid/mountains_1024_3072.png b/engine/src/test-data/Textures/Terrain/grid/mountains_1024_3072.png
deleted file mode 100644
index 703edf942..000000000
Binary files a/engine/src/test-data/Textures/Terrain/grid/mountains_1024_3072.png and /dev/null differ
diff --git a/engine/src/test-data/Textures/Terrain/grid/mountains_1024_512.png b/engine/src/test-data/Textures/Terrain/grid/mountains_1024_512.png
deleted file mode 100644
index a1a83c017..000000000
Binary files a/engine/src/test-data/Textures/Terrain/grid/mountains_1024_512.png and /dev/null differ
diff --git a/engine/src/test-data/Textures/Terrain/grid/mountains_1536_-512.png b/engine/src/test-data/Textures/Terrain/grid/mountains_1536_-512.png
deleted file mode 100644
index 4b853b45e..000000000
Binary files a/engine/src/test-data/Textures/Terrain/grid/mountains_1536_-512.png and /dev/null differ
diff --git a/engine/src/test-data/Textures/Terrain/grid/mountains_1536_0.png b/engine/src/test-data/Textures/Terrain/grid/mountains_1536_0.png
deleted file mode 100644
index ac49d1535..000000000
Binary files a/engine/src/test-data/Textures/Terrain/grid/mountains_1536_0.png and /dev/null differ
diff --git a/engine/src/test-data/Textures/Terrain/grid/mountains_1536_1024.png b/engine/src/test-data/Textures/Terrain/grid/mountains_1536_1024.png
deleted file mode 100644
index 38e61f429..000000000
Binary files a/engine/src/test-data/Textures/Terrain/grid/mountains_1536_1024.png and /dev/null differ
diff --git a/engine/src/test-data/Textures/Terrain/grid/mountains_1536_1536.png b/engine/src/test-data/Textures/Terrain/grid/mountains_1536_1536.png
deleted file mode 100644
index 9a1855b75..000000000
Binary files a/engine/src/test-data/Textures/Terrain/grid/mountains_1536_1536.png and /dev/null differ
diff --git a/engine/src/test-data/Textures/Terrain/grid/mountains_1536_2048.png b/engine/src/test-data/Textures/Terrain/grid/mountains_1536_2048.png
deleted file mode 100644
index e5b374813..000000000
Binary files a/engine/src/test-data/Textures/Terrain/grid/mountains_1536_2048.png and /dev/null differ
diff --git a/engine/src/test-data/Textures/Terrain/grid/mountains_1536_2560.png b/engine/src/test-data/Textures/Terrain/grid/mountains_1536_2560.png
deleted file mode 100644
index 367409f73..000000000
Binary files a/engine/src/test-data/Textures/Terrain/grid/mountains_1536_2560.png and /dev/null differ
diff --git a/engine/src/test-data/Textures/Terrain/grid/mountains_1536_3072.png b/engine/src/test-data/Textures/Terrain/grid/mountains_1536_3072.png
deleted file mode 100644
index 5c534934a..000000000
Binary files a/engine/src/test-data/Textures/Terrain/grid/mountains_1536_3072.png and /dev/null differ
diff --git a/engine/src/test-data/Textures/Terrain/grid/mountains_1536_512.png b/engine/src/test-data/Textures/Terrain/grid/mountains_1536_512.png
deleted file mode 100644
index e1c90844c..000000000
Binary files a/engine/src/test-data/Textures/Terrain/grid/mountains_1536_512.png and /dev/null differ
diff --git a/engine/src/test-data/Textures/Terrain/grid/mountains_2048_-512.png b/engine/src/test-data/Textures/Terrain/grid/mountains_2048_-512.png
deleted file mode 100644
index 99957762b..000000000
Binary files a/engine/src/test-data/Textures/Terrain/grid/mountains_2048_-512.png and /dev/null differ
diff --git a/engine/src/test-data/Textures/Terrain/grid/mountains_2048_0.png b/engine/src/test-data/Textures/Terrain/grid/mountains_2048_0.png
deleted file mode 100644
index 718dab60c..000000000
Binary files a/engine/src/test-data/Textures/Terrain/grid/mountains_2048_0.png and /dev/null differ
diff --git a/engine/src/test-data/Textures/Terrain/grid/mountains_2048_1024.png b/engine/src/test-data/Textures/Terrain/grid/mountains_2048_1024.png
deleted file mode 100644
index 1d7a16a1a..000000000
Binary files a/engine/src/test-data/Textures/Terrain/grid/mountains_2048_1024.png and /dev/null differ
diff --git a/engine/src/test-data/Textures/Terrain/grid/mountains_2048_1536.png b/engine/src/test-data/Textures/Terrain/grid/mountains_2048_1536.png
deleted file mode 100644
index 34e3d526f..000000000
Binary files a/engine/src/test-data/Textures/Terrain/grid/mountains_2048_1536.png and /dev/null differ
diff --git a/engine/src/test-data/Textures/Terrain/grid/mountains_2048_2048.png b/engine/src/test-data/Textures/Terrain/grid/mountains_2048_2048.png
deleted file mode 100644
index 17c3ed46c..000000000
Binary files a/engine/src/test-data/Textures/Terrain/grid/mountains_2048_2048.png and /dev/null differ
diff --git a/engine/src/test-data/Textures/Terrain/grid/mountains_2048_2560.png b/engine/src/test-data/Textures/Terrain/grid/mountains_2048_2560.png
deleted file mode 100644
index 2374ede91..000000000
Binary files a/engine/src/test-data/Textures/Terrain/grid/mountains_2048_2560.png and /dev/null differ
diff --git a/engine/src/test-data/Textures/Terrain/grid/mountains_2048_3072.png b/engine/src/test-data/Textures/Terrain/grid/mountains_2048_3072.png
deleted file mode 100644
index ba372cfd2..000000000
Binary files a/engine/src/test-data/Textures/Terrain/grid/mountains_2048_3072.png and /dev/null differ
diff --git a/engine/src/test-data/Textures/Terrain/grid/mountains_2048_512.png b/engine/src/test-data/Textures/Terrain/grid/mountains_2048_512.png
deleted file mode 100644
index a8b6317c7..000000000
Binary files a/engine/src/test-data/Textures/Terrain/grid/mountains_2048_512.png and /dev/null differ
diff --git a/engine/src/test-data/Textures/Terrain/grid/mountains_512_-512.png b/engine/src/test-data/Textures/Terrain/grid/mountains_512_-512.png
deleted file mode 100644
index fe2994eed..000000000
Binary files a/engine/src/test-data/Textures/Terrain/grid/mountains_512_-512.png and /dev/null differ
diff --git a/engine/src/test-data/Textures/Terrain/grid/mountains_512_0.png b/engine/src/test-data/Textures/Terrain/grid/mountains_512_0.png
deleted file mode 100644
index 3283e98e6..000000000
Binary files a/engine/src/test-data/Textures/Terrain/grid/mountains_512_0.png and /dev/null differ
diff --git a/engine/src/test-data/Textures/Terrain/grid/mountains_512_1024.png b/engine/src/test-data/Textures/Terrain/grid/mountains_512_1024.png
deleted file mode 100644
index df47024b0..000000000
Binary files a/engine/src/test-data/Textures/Terrain/grid/mountains_512_1024.png and /dev/null differ
diff --git a/engine/src/test-data/Textures/Terrain/grid/mountains_512_1536.png b/engine/src/test-data/Textures/Terrain/grid/mountains_512_1536.png
deleted file mode 100644
index ee32fa535..000000000
Binary files a/engine/src/test-data/Textures/Terrain/grid/mountains_512_1536.png and /dev/null differ
diff --git a/engine/src/test-data/Textures/Terrain/grid/mountains_512_2048.png b/engine/src/test-data/Textures/Terrain/grid/mountains_512_2048.png
deleted file mode 100644
index f2e7b3b60..000000000
Binary files a/engine/src/test-data/Textures/Terrain/grid/mountains_512_2048.png and /dev/null differ
diff --git a/engine/src/test-data/Textures/Terrain/grid/mountains_512_2560.png b/engine/src/test-data/Textures/Terrain/grid/mountains_512_2560.png
deleted file mode 100644
index 4c3a0ada4..000000000
Binary files a/engine/src/test-data/Textures/Terrain/grid/mountains_512_2560.png and /dev/null differ
diff --git a/engine/src/test-data/Textures/Terrain/grid/mountains_512_3072.png b/engine/src/test-data/Textures/Terrain/grid/mountains_512_3072.png
deleted file mode 100644
index c70af7f70..000000000
Binary files a/engine/src/test-data/Textures/Terrain/grid/mountains_512_3072.png and /dev/null differ
diff --git a/engine/src/test-data/Textures/Terrain/grid/mountains_512_512.png b/engine/src/test-data/Textures/Terrain/grid/mountains_512_512.png
deleted file mode 100644
index a4f32aca2..000000000
Binary files a/engine/src/test-data/Textures/Terrain/grid/mountains_512_512.png and /dev/null differ
diff --git a/engine/src/test/jme3test/terrain/TerrainGridTest.java b/engine/src/test/jme3test/terrain/TerrainGridTest.java
index 9d206b490..0b277c5e7 100644
--- a/engine/src/test/jme3test/terrain/TerrainGridTest.java
+++ b/engine/src/test/jme3test/terrain/TerrainGridTest.java
@@ -5,6 +5,8 @@ import java.util.List;
import com.jme3.app.SimpleApplication;
import com.jme3.app.state.ScreenshotAppState;
+import com.jme3.asset.plugins.HttpZipLocator;
+import com.jme3.asset.plugins.ZipLocator;
import com.jme3.bullet.BulletAppState;
import com.jme3.bullet.collision.shapes.CapsuleCollisionShape;
import com.jme3.bullet.collision.shapes.HeightfieldCollisionShape;
@@ -25,6 +27,7 @@ import com.jme3.terrain.heightmap.ImageBasedHeightMapGrid;
import com.jme3.terrain.heightmap.Namer;
import com.jme3.texture.Texture;
import com.jme3.texture.Texture.WrapMode;
+import java.io.File;
import org.novyon.noise.ShaderUtils;
import org.novyon.noise.basis.FilteredBasis;
import org.novyon.noise.filter.IterativeFilter;
@@ -56,6 +59,13 @@ public class TerrainGridTest extends SimpleApplication {
@Override
public void simpleInitApp() {
+ File file = new File("mountains.zip");
+ if (!file.exists()) {
+ assetManager.registerLocator("http://jmonkeyengine.googlecode.com/files/mountains.zip", HttpZipLocator.class.getName());
+ }else{
+ assetManager.registerLocator("mountains.zip", ZipLocator.class.getName());
+ }
+
this.flyCam.setMoveSpeed(100f);
ScreenshotAppState state = new ScreenshotAppState();
this.stateManager.attach(state);
@@ -86,7 +96,7 @@ public class TerrainGridTest extends SimpleApplication {
this.mat_terrain.setVector3("region2", new Vector3f(0, 90, this.dirtScale));
// ROCK texture
- Texture rock = this.assetManager.loadTexture("Textures/Terrain/grid/rock.jpg");
+ Texture rock = this.assetManager.loadTexture("Textures/Terrain/Rock2/rock.jpg");
rock.setWrap(WrapMode.Repeat);
this.mat_terrain.setTexture("region3ColorMap", rock);
this.mat_terrain.setVector3("region3", new Vector3f(198, 260, this.rockScale));
@@ -104,7 +114,6 @@ public class TerrainGridTest extends SimpleApplication {
this.base.setOctaves(8);
this.base.setScale(0.02125f);
this.base.addModulator(new NoiseModulator() {
-
@Override
public float value(float... in) {
return ShaderUtils.clamp(in[0] * 0.5f + 0.5f, 0, 1);
@@ -133,9 +142,8 @@ public class TerrainGridTest extends SimpleApplication {
ground.addPreFilter(this.iterate);
this.terrain = new TerrainGrid("terrain", 65, 1025, new ImageBasedHeightMapGrid(assetManager, new Namer() {
-
public String getName(int x, int y) {
- return "Textures/Terrain/grid/mountains_" + (x * 512) + "_" + (y * 512) + ".png";
+ return "Scenes/TerrainMountains/mountains_" + (x * 512) + "_" + (y * 512) + ".png";
}
}));
diff --git a/engine/src/test/jme3test/terrain/TerrainTest.java b/engine/src/test/jme3test/terrain/TerrainTest.java
index d4405464f..889d100e9 100644
--- a/engine/src/test/jme3test/terrain/TerrainTest.java
+++ b/engine/src/test/jme3test/terrain/TerrainTest.java
@@ -176,8 +176,8 @@ public class TerrainTest extends SimpleApplication {
light.setDirection((new Vector3f(-0.5f, -1f, -0.5f)).normalize());
rootNode.addLight(light);
- getCamera().getLocation().y = 10;
- getCamera().setDirection(new Vector3f(0, -1.5f, -1));
+ cam.setLocation(new Vector3f(0, 10, -10));
+ cam.lookAtDirection(new Vector3f(0, -1.5f, -1).normalizeLocal(), Vector3f.UNIT_Y);
}
public void loadHintText() {
diff --git a/engine/src/test/jme3test/terrain/TerrainTestAdvanced.java b/engine/src/test/jme3test/terrain/TerrainTestAdvanced.java
index 55977dcb0..2f60e7f7e 100644
--- a/engine/src/test/jme3test/terrain/TerrainTestAdvanced.java
+++ b/engine/src/test/jme3test/terrain/TerrainTestAdvanced.java
@@ -129,7 +129,7 @@ public class TerrainTestAdvanced extends SimpleApplication {
matTerrain.setFloat("DiffuseMap_2_scale", rockScale);
- Texture normalMap0 = assetManager.loadTexture("Textures/Terrain/splat/grass_normal.png");
+ Texture normalMap0 = assetManager.loadTexture("Textures/Terrain/splat/grass_normal.jpg");
normalMap0.setWrap(WrapMode.Repeat);
Texture normalMap1 = assetManager.loadTexture("Textures/Terrain/splat/dirt_normal.png");
normalMap1.setWrap(WrapMode.Repeat);
@@ -187,8 +187,8 @@ public class TerrainTestAdvanced extends SimpleApplication {
ambLight.setColor(new ColorRGBA(1f, 1f, 0.8f, 0.2f));
rootNode.addLight(ambLight);
- getCamera().getLocation().y = 10;
- getCamera().setDirection(new Vector3f(0, -1.5f, -1));
+ cam.setLocation(new Vector3f(0, 10, -10));
+ cam.lookAtDirection(new Vector3f(0, -1.5f, -1).normalizeLocal(), Vector3f.UNIT_Y);
}
public void loadHintText() {
diff --git a/engine/src/test/jme3test/terrain/TerrainTestCollision.java b/engine/src/test/jme3test/terrain/TerrainTestCollision.java
index 8dc8edd87..f6a89531b 100644
--- a/engine/src/test/jme3test/terrain/TerrainTestCollision.java
+++ b/engine/src/test/jme3test/terrain/TerrainTestCollision.java
@@ -183,8 +183,8 @@ public class TerrainTestCollision extends SimpleApplication {
dl.setColor(new ColorRGBA(0.50f, 0.40f, 0.50f, 1.0f));
rootNode.addLight(dl);
- getCamera().getLocation().y = 25;
- getCamera().setDirection(new Vector3f(0, -1, 0));
+ cam.setLocation(new Vector3f(0, 25, -10));
+ cam.lookAtDirection(new Vector3f(0, -1, 0).normalizeLocal(), Vector3f.UNIT_Y);
}
public void loadHintText() {
@@ -274,7 +274,7 @@ public class TerrainTestCollision extends SimpleApplication {
collisionMarker.setLocalTranslation(new Vector3f(hit.getContactPoint().x, height, hit.getContactPoint().z));
}
} else if (binding.equals("cameraDown") && !keyPressed) {
- getCamera().setDirection(new Vector3f(0, -1, 0));
+ getCamera().lookAtDirection(new Vector3f(0, -1, 0), Vector3f.UNIT_Y);
} else if (binding.equals("Lefts") && !keyPressed) {
Vector3f oldLoc = selectedCollisionObject.getLocalTranslation().clone();
selectedCollisionObject.move(-0.5f, 0, 0);
diff --git a/engine/src/test/jme3test/terrain/TerrainTestModifyHeight.java b/engine/src/test/jme3test/terrain/TerrainTestModifyHeight.java
index 93d1133d9..94cf5c25d 100644
--- a/engine/src/test/jme3test/terrain/TerrainTestModifyHeight.java
+++ b/engine/src/test/jme3test/terrain/TerrainTestModifyHeight.java
@@ -153,8 +153,8 @@ public class TerrainTestModifyHeight extends SimpleApplication {
ambLight.setColor(new ColorRGBA(1f, 1f, 0.8f, 0.2f));
rootNode.addLight(ambLight);
- getCamera().getLocation().y = 10;
- getCamera().setDirection(new Vector3f(0, -1.5f, -1));
+ cam.setLocation(new Vector3f(0, 10, -10));
+ cam.lookAtDirection(new Vector3f(0, -1.5f, -1).normalizeLocal(), Vector3f.UNIT_Y);
}
public void loadHintText() {
diff --git a/engine/src/test/jme3test/terrain/TerrainTestReadWrite.java b/engine/src/test/jme3test/terrain/TerrainTestReadWrite.java
index 423728d6a..8bcbef586 100644
--- a/engine/src/test/jme3test/terrain/TerrainTestReadWrite.java
+++ b/engine/src/test/jme3test/terrain/TerrainTestReadWrite.java
@@ -129,7 +129,7 @@ public class TerrainTestReadWrite extends SimpleApplication {
matTerrain.setFloat("DiffuseMap_2_scale", rockScale);
- Texture normalMap0 = assetManager.loadTexture("Textures/Terrain/splat/grass_normal.png");
+ Texture normalMap0 = assetManager.loadTexture("Textures/Terrain/splat/grass_normal.jpg");
normalMap0.setWrap(WrapMode.Repeat);
Texture normalMap1 = assetManager.loadTexture("Textures/Terrain/splat/dirt_normal.png");
normalMap1.setWrap(WrapMode.Repeat);
diff --git a/engine/src/test/jme3test/texture/TestNormalLatc.java b/engine/src/test/jme3test/texture/TestNormalLatc.java
deleted file mode 100644
index 338175165..000000000
--- a/engine/src/test/jme3test/texture/TestNormalLatc.java
+++ /dev/null
@@ -1,92 +0,0 @@
-/*
- * Copyright (c) 2009-2010 jMonkeyEngine
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * * Neither the name of 'jMonkeyEngine' nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
- * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-package jme3test.texture;
-
-import com.jme3.app.SimpleApplication;
-import com.jme3.asset.TextureKey;
-import com.jme3.font.BitmapFont;
-import com.jme3.font.BitmapText;
-import com.jme3.material.Material;
-import com.jme3.math.Vector3f;
-import com.jme3.scene.Geometry;
-import com.jme3.scene.shape.Quad;
-import com.jme3.texture.Texture;
-
-public class TestNormalLatc extends SimpleApplication {
-
- private Quad quadMesh;
-
- public static void main(String[] args){
- TestNormalLatc app = new TestNormalLatc();
- app.start();
- }
-
- public Geometry createQuad(float side, String texName, boolean latc){
- Geometry quad = new Geometry("Textured Quad", quadMesh);
-
- TextureKey key = new TextureKey(texName, true);
- key.setGenerateMips(false);
- Texture tex = assetManager.loadTexture(key);
- Material mat = new Material(assetManager, "Common/MatDefs/Misc/Unshaded.j3md");
- mat.setTexture("ColorMap", tex);
-// mat.setBoolean("Normalize", true);
- if (latc)
- mat.setBoolean("LATC", true);
-
- quad.setMaterial(mat);
-
- float aspect = tex.getImage().getWidth() / (float) tex.getImage().getHeight();
- quad.setLocalScale(new Vector3f(aspect * 5, 5, 1));
- quad.center();
- quad.setLocalTranslation(quad.getLocalTranslation().x + quad.getLocalScale().x * side, 0, 0);
-
- return quad;
- }
-
- public void simpleInitApp() {
- BitmapFont font = assetManager.loadFont("Interface/Fonts/Default.fnt");
- BitmapText txt = new BitmapText(font, false);
- txt.setText("Left: LATC, Middle: JPG, Right: DXT1nm");
- txt.setLocalTranslation(0, txt.getLineHeight() * 2, 0);
- guiNode.attachChild(txt);
-
- // create a simple plane/quad
- quadMesh = new Quad(1, 1);
- quadMesh.updateGeometry(1, 1, false);
-
- rootNode.attachChild(createQuad(-1f, "Textures/BumpMapTest/Dot3_latc.dds", true));
- rootNode.attachChild(createQuad(0f, "Textures/BumpMapTest/Dot3.jpg", false));
- rootNode.attachChild(createQuad(1f, "Textures/BumpMapTest/Dot3_dxt1.dds", false));
- }
-
-}