Updated TerrainFractalGridTest and TerrainGridTest to call terrain.initialize()
git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@7614 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
This commit is contained in:
parent
e173bfb441
commit
155ab1c1c6
@ -37,7 +37,7 @@ import org.novyon.noise.modulator.NoiseModulator;
|
||||
public class TerrainFractalGridTest extends SimpleApplication {
|
||||
|
||||
private Material mat_terrain;
|
||||
private TerrainQuad terrain;
|
||||
private TerrainGrid terrain;
|
||||
private float grassScale = 64;
|
||||
private float dirtScale = 16;
|
||||
private float rockScale = 128;
|
||||
@ -86,7 +86,7 @@ public class TerrainFractalGridTest 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));
|
||||
@ -137,6 +137,7 @@ public class TerrainFractalGridTest extends SimpleApplication {
|
||||
this.terrain.setMaterial(this.mat_terrain);
|
||||
this.terrain.setLocalTranslation(0, 0, 0);
|
||||
this.terrain.setLocalScale(2f, 1f, 2f);
|
||||
this.terrain.initialize(Vector3f.ZERO);
|
||||
this.rootNode.attachChild(this.terrain);
|
||||
|
||||
List<Camera> cameras = new ArrayList<Camera>();
|
||||
|
@ -40,7 +40,7 @@ import org.novyon.noise.modulator.NoiseModulator;
|
||||
public class TerrainGridTest extends SimpleApplication {
|
||||
|
||||
private Material mat_terrain;
|
||||
private TerrainQuad terrain;
|
||||
private TerrainGrid terrain;
|
||||
private float grassScale = 64;
|
||||
private float dirtScale = 16;
|
||||
private float rockScale = 128;
|
||||
@ -65,7 +65,7 @@ public class TerrainGridTest extends SimpleApplication {
|
||||
}else{
|
||||
assetManager.registerLocator("mountains.zip", ZipLocator.class.getName());
|
||||
}
|
||||
|
||||
|
||||
this.flyCam.setMoveSpeed(100f);
|
||||
ScreenshotAppState state = new ScreenshotAppState();
|
||||
this.stateManager.attach(state);
|
||||
@ -150,6 +150,7 @@ public class TerrainGridTest extends SimpleApplication {
|
||||
this.terrain.setMaterial(this.mat_terrain);
|
||||
this.terrain.setLocalTranslation(0, 0, 0);
|
||||
this.terrain.setLocalScale(2f, 1f, 2f);
|
||||
this.terrain.initialize(Vector3f.ZERO);
|
||||
this.rootNode.attachChild(this.terrain);
|
||||
|
||||
List<Camera> cameras = new ArrayList<Camera>();
|
||||
|
Loading…
x
Reference in New Issue
Block a user