diff --git a/engine/src/test/jme3test/terrain/TerrainGridTest.java b/engine/src/test/jme3test/terrain/TerrainGridTest.java index a517498cb..60a40265a 100644 --- a/engine/src/test/jme3test/terrain/TerrainGridTest.java +++ b/engine/src/test/jme3test/terrain/TerrainGridTest.java @@ -1,7 +1,5 @@ package jme3test.terrain; -import java.util.ArrayList; -import java.util.List; import com.jme3.app.SimpleApplication; import com.jme3.app.state.ScreenshotAppState; @@ -18,24 +16,13 @@ import com.jme3.input.controls.KeyTrigger; import com.jme3.material.Material; import com.jme3.math.ColorRGBA; import com.jme3.math.Vector3f; -import com.jme3.renderer.Camera; import com.jme3.terrain.geomipmap.TerrainGrid; import com.jme3.terrain.geomipmap.TerrainLodControl; -import com.jme3.terrain.geomipmap.TerrainQuad; -import com.jme3.terrain.heightmap.FractalHeightMapGrid; 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; -import org.novyon.noise.filter.OptimizedErode; -import org.novyon.noise.filter.PerturbFilter; -import org.novyon.noise.filter.SmoothFilter; -import org.novyon.noise.fractal.FractalSum; -import org.novyon.noise.modulator.NoiseModulator; public class TerrainGridTest extends SimpleApplication { @@ -116,9 +103,7 @@ public class TerrainGridTest extends SimpleApplication { this.terrain.initialize(Vector3f.ZERO); this.rootNode.attachChild(this.terrain); - List cameras = new ArrayList(); - cameras.add(this.getCamera()); - TerrainLodControl control = new TerrainLodControl(this.terrain, cameras); + TerrainLodControl control = new TerrainLodControl(this.terrain, getCamera()); this.terrain.addControl(control); BulletAppState bulletAppState = new BulletAppState(); diff --git a/engine/src/test/jme3test/terrain/TerrainTest.java b/engine/src/test/jme3test/terrain/TerrainTest.java index 902b4d04c..66a638882 100644 --- a/engine/src/test/jme3test/terrain/TerrainTest.java +++ b/engine/src/test/jme3test/terrain/TerrainTest.java @@ -33,7 +33,6 @@ package jme3test.terrain; import jme3tools.converters.ImageToAwt; import com.jme3.app.SimpleApplication; -import com.jme3.bounding.BoundingBox; import com.jme3.font.BitmapText; import com.jme3.input.KeyInput; import com.jme3.input.controls.ActionListener; @@ -43,17 +42,13 @@ import com.jme3.light.PointLight; import com.jme3.material.Material; import com.jme3.math.ColorRGBA; import com.jme3.math.Vector3f; -import com.jme3.renderer.Camera; import com.jme3.scene.Geometry; import com.jme3.terrain.geomipmap.TerrainLodControl; import com.jme3.terrain.heightmap.AbstractHeightMap; import com.jme3.terrain.heightmap.ImageBasedHeightMap; import com.jme3.terrain.geomipmap.TerrainQuad; -import com.jme3.terrain.geomipmap.lodcalc.LodPerspectiveCalculatorFactory; import com.jme3.texture.Texture; import com.jme3.texture.Texture.WrapMode; -import java.util.ArrayList; -import java.util.List; /** * Demonstrates how to use terrain. @@ -161,9 +156,7 @@ public class TerrainTest extends SimpleApplication { * size=2049, it got really slow. But that is a jump from 2 million to 8 million triangles... */ terrain = new TerrainQuad("terrain", 65, 513, heightmap.getHeightMap());//, new LodPerspectiveCalculatorFactory(getCamera(), 4)); // add this in to see it use entropy for LOD calculations - List cameras = new ArrayList(); - cameras.add(getCamera()); - TerrainLodControl control = new TerrainLodControl(terrain, cameras); + TerrainLodControl control = new TerrainLodControl(terrain, getCamera()); terrain.addControl(control); terrain.setMaterial(matRock); terrain.setLocalTranslation(0, -100, 0); diff --git a/engine/src/test/jme3test/terrain/TerrainTestAdvanced.java b/engine/src/test/jme3test/terrain/TerrainTestAdvanced.java index 6ad3b9433..ebeddfd62 100644 --- a/engine/src/test/jme3test/terrain/TerrainTestAdvanced.java +++ b/engine/src/test/jme3test/terrain/TerrainTestAdvanced.java @@ -44,7 +44,6 @@ import com.jme3.light.PointLight; import com.jme3.material.Material; import com.jme3.math.ColorRGBA; import com.jme3.math.Vector3f; -import com.jme3.renderer.Camera; import com.jme3.scene.Geometry; import com.jme3.scene.Spatial; import com.jme3.terrain.geomipmap.TerrainLodControl; @@ -54,8 +53,6 @@ import com.jme3.terrain.geomipmap.TerrainQuad; import com.jme3.texture.Texture; import com.jme3.texture.Texture.WrapMode; import com.jme3.util.SkyFactory; -import java.util.ArrayList; -import java.util.List; /** * Uses the terrain's lighting texture with normal maps and lights. @@ -180,9 +177,7 @@ public class TerrainTestAdvanced extends SimpleApplication { * size=2049, it got really slow. But that is a jump from 2 million to 8 million triangles... */ terrain = new TerrainQuad("terrain", 65, 513, heightmap.getHeightMap());//, new LodPerspectiveCalculatorFactory(getCamera(), 4)); // add this in to see it use entropy for LOD calculations - List cameras = new ArrayList(); - cameras.add(getCamera()); - TerrainLodControl control = new TerrainLodControl(terrain, cameras); + TerrainLodControl control = new TerrainLodControl(terrain, getCamera()); terrain.addControl(control); terrain.setMaterial(matTerrain); terrain.setModelBound(new BoundingBox()); diff --git a/engine/src/test/jme3test/terrain/TerrainTestCollision.java b/engine/src/test/jme3test/terrain/TerrainTestCollision.java index 51c8bec27..4672b983e 100644 --- a/engine/src/test/jme3test/terrain/TerrainTestCollision.java +++ b/engine/src/test/jme3test/terrain/TerrainTestCollision.java @@ -36,7 +36,6 @@ import com.jme3.bullet.collision.shapes.SphereCollisionShape; import com.jme3.bounding.BoundingBox; import com.jme3.bullet.BulletAppState; import com.jme3.app.SimpleApplication; -import com.jme3.bounding.BoundingSphere; import com.jme3.bullet.control.RigidBodyControl; import com.jme3.collision.CollisionResult; import com.jme3.collision.CollisionResults; @@ -53,7 +52,6 @@ import com.jme3.math.ColorRGBA; import com.jme3.math.Ray; import com.jme3.math.Vector2f; import com.jme3.math.Vector3f; -import com.jme3.renderer.Camera; import com.jme3.scene.Geometry; import com.jme3.scene.Node; import com.jme3.scene.shape.Box; @@ -64,8 +62,6 @@ import com.jme3.terrain.heightmap.ImageBasedHeightMap; import com.jme3.terrain.geomipmap.TerrainQuad; import com.jme3.texture.Texture; import com.jme3.texture.Texture.WrapMode; -import java.util.ArrayList; -import java.util.List; /** * Creates a terrain object and a collision node to go with it. Then @@ -137,9 +133,7 @@ public class TerrainTestCollision extends SimpleApplication { } terrain = new TerrainQuad("terrain", 65, 513, heightmap.getHeightMap()); - List cameras = new ArrayList(); - cameras.add(getCamera()); - TerrainLodControl control = new TerrainLodControl(terrain, cameras); + TerrainLodControl control = new TerrainLodControl(terrain, getCamera()); terrain.addControl(control); terrain.setMaterial(matRock); terrain.setLocalScale(new Vector3f(2, 2, 2)); diff --git a/engine/src/test/jme3test/terrain/TerrainTestModifyHeight.java b/engine/src/test/jme3test/terrain/TerrainTestModifyHeight.java index f2a43282c..69e9c65bf 100644 --- a/engine/src/test/jme3test/terrain/TerrainTestModifyHeight.java +++ b/engine/src/test/jme3test/terrain/TerrainTestModifyHeight.java @@ -32,7 +32,6 @@ package jme3test.terrain; import com.jme3.app.SimpleApplication; -import com.jme3.bounding.BoundingBox; import com.jme3.collision.CollisionResult; import com.jme3.collision.CollisionResults; import com.jme3.font.BitmapText; @@ -48,7 +47,6 @@ import com.jme3.math.ColorRGBA; import com.jme3.math.Ray; import com.jme3.math.Vector2f; import com.jme3.math.Vector3f; -import com.jme3.renderer.Camera; import com.jme3.terrain.geomipmap.TerrainLodControl; import com.jme3.terrain.geomipmap.TerrainQuad; import com.jme3.texture.Texture; @@ -140,9 +138,7 @@ public class TerrainTestModifyHeight extends SimpleApplication { // CREATE THE TERRAIN terrain = new TerrainQuad("terrain", 65, 513, null); - List cameras = new ArrayList(); - cameras.add(getCamera()); - TerrainLodControl control = new TerrainLodControl(terrain, cameras); + TerrainLodControl control = new TerrainLodControl(terrain, getCamera()); terrain.addControl(control); terrain.setMaterial(matTerrain); terrain.setLocalTranslation(0, -100, 0); diff --git a/engine/src/test/jme3test/terrain/TerrainTestReadWrite.java b/engine/src/test/jme3test/terrain/TerrainTestReadWrite.java index 0b0a376cf..9b40303b5 100644 --- a/engine/src/test/jme3test/terrain/TerrainTestReadWrite.java +++ b/engine/src/test/jme3test/terrain/TerrainTestReadWrite.java @@ -32,7 +32,6 @@ package jme3test.terrain; import com.jme3.app.SimpleApplication; -import com.jme3.bounding.BoundingBox; import com.jme3.export.Savable; import com.jme3.export.binary.BinaryExporter; import com.jme3.export.binary.BinaryImporter; @@ -44,7 +43,6 @@ import com.jme3.light.DirectionalLight; import com.jme3.material.Material; import com.jme3.math.ColorRGBA; import com.jme3.math.Vector3f; -import com.jme3.renderer.Camera; import com.jme3.scene.Node; import com.jme3.terrain.Terrain; import com.jme3.terrain.geomipmap.TerrainLodControl; @@ -59,8 +57,6 @@ import java.io.File; import java.io.FileInputStream; import java.io.FileOutputStream; import java.io.IOException; -import java.util.ArrayList; -import java.util.List; import java.util.logging.Level; import java.util.logging.Logger; import jme3tools.converters.ImageToAwt; @@ -162,9 +158,7 @@ public class TerrainTestReadWrite extends SimpleApplication { } else { // create the terrain as normal, and give it a control for LOD management TerrainQuad terrainQuad = new TerrainQuad("terrain", 65, 129, heightmap.getHeightMap());//, new LodPerspectiveCalculatorFactory(getCamera(), 4)); // add this in to see it use entropy for LOD calculations - List cameras = new ArrayList(); - cameras.add(getCamera()); - TerrainLodControl control = new TerrainLodControl(terrainQuad, cameras); + TerrainLodControl control = new TerrainLodControl(terrainQuad, getCamera()); terrainQuad.addControl(control); terrainQuad.setMaterial(matTerrain); terrainQuad.setLocalTranslation(0, -100, 0);