Lines Matching refs:terrain
1 package jme3test.terrain;
19 import com.jme3.terrain.geomipmap.TerrainGrid;
20 import com.jme3.terrain.geomipmap.TerrainGridListener;
21 import com.jme3.terrain.geomipmap.TerrainLodControl;
22 import com.jme3.terrain.geomipmap.TerrainQuad;
23 import com.jme3.terrain.geomipmap.grid.ImageTileLoader;
24 import com.jme3.terrain.geomipmap.lodcalc.DistanceLodCalculator;
25 import com.jme3.terrain.heightmap.Namer;
33 private TerrainGrid terrain;
59 // TERRAIN TEXTURE material
60 this.mat_terrain = new Material(this.assetManager, "Common/MatDefs/Terrain/HeightBasedTerrain.j3md");
71 // terrainSize: the total size of the terrain (used for scaling the texture)
73 Texture grass = this.assetManager.loadTexture("Textures/Terrain/splat/grass.jpg");
79 Texture dirt = this.assetManager.loadTexture("Textures/Terrain/splat/dirt.jpg");
85 Texture rock = this.assetManager.loadTexture("Textures/Terrain/Rock2/rock.jpg");
98 this.terrain = new TerrainGrid("terrain", 65, 257, new ImageTileLoader(assetManager, new Namer() {
105 this.terrain.setMaterial(mat_terrain);
106 this.terrain.setLocalTranslation(0, 0, 0);
107 this.terrain.setLocalScale(1f, 1f, 1f);
108 this.rootNode.attachChild(this.terrain);
110 TerrainLodControl control = new TerrainLodControl(this.terrain, getCamera());
112 this.terrain.addControl(control);
136 terrain.addListener(new TerrainGridListener() {
149 quad.addControl(new RigidBodyControl(new HeightfieldCollisionShape(quad.getHeightMap(), terrain.getLocalScale()), 0));