Lines Matching refs:terrain
1 package jme3test.terrain;
18 import com.jme3.terrain.geomipmap.TerrainGrid;
19 import com.jme3.terrain.geomipmap.TerrainGridListener;
20 import com.jme3.terrain.geomipmap.TerrainLodControl;
21 import com.jme3.terrain.geomipmap.TerrainQuad;
22 import com.jme3.terrain.geomipmap.grid.AssetTileLoader;
23 import com.jme3.terrain.geomipmap.lodcalc.DistanceLodCalculator;
31 private TerrainGrid terrain;
57 // TERRAIN TEXTURE material
58 this.mat_terrain = new Material(this.assetManager, "Common/MatDefs/Terrain/HeightBasedTerrain.j3md");
69 // terrainSize: the total size of the terrain (used for scaling the texture)
71 Texture grass = this.assetManager.loadTexture("Textures/Terrain/splat/grass.jpg");
77 Texture dirt = this.assetManager.loadTexture("Textures/Terrain/splat/dirt.jpg");
83 Texture rock = this.assetManager.loadTexture("Textures/Terrain/Rock2/rock.jpg");
95 //quad.getHeightMap(), terrain.getLocalScale()), 0
97 this.terrain = new TerrainGrid("terrain", 65, 257, grid);
99 this.terrain.setMaterial(this.mat_terrain);
100 this.terrain.setLocalTranslation(0, 0, 0);
101 this.terrain.setLocalScale(2f, 1f, 2f);
103 // BinaryExporter.getInstance().save(terrain, new File("/Users/normenhansen/Documents/Code/jme3/engine/src/test-data/TerrainGrid/"
109 this.rootNode.attachChild(this.terrain);
111 TerrainLodControl control = new TerrainLodControl(this.terrain, getCamera());
113 this.terrain.addControl(control);
133 terrain.addListener(new TerrainGridListener() {
146 quad.addControl(new RigidBodyControl(new HeightfieldCollisionShape(quad.getHeightMap(), terrain.getLocalScale()), 0));