Home | History | Annotate | Download | only in terrain

Lines Matching refs:terrain

32 package jme3test.terrain;
47 import com.jme3.terrain.Terrain;
48 import com.jme3.terrain.geomipmap.TerrainLodControl;
49 import com.jme3.terrain.geomipmap.TerrainQuad;
50 import com.jme3.terrain.geomipmap.lodcalc.DistanceLodCalculator;
51 import com.jme3.terrain.heightmap.AbstractHeightMap;
52 import com.jme3.terrain.heightmap.ImageBasedHeightMap;
60 * Saves and loads terrain.
66 private Terrain terrain;
96 matTerrain = new Material(assetManager, "Common/MatDefs/Terrain/TerrainLighting.j3md");
101 matTerrain.setTexture("AlphaMap", assetManager.loadTexture("Textures/Terrain/splat/alphamap.png"));
103 // HEIGHTMAP image (for the terrain heightmap)
104 Texture heightMapImage = assetManager.loadTexture("Textures/Terrain/splat/mountains512.png");
107 Texture grass = assetManager.loadTexture("Textures/Terrain/splat/grass.jpg");
114 Texture dirt = assetManager.loadTexture("Textures/Terrain/splat/dirt.jpg");
120 Texture rock = assetManager.loadTexture("Textures/Terrain/splat/road.jpg");
126 Texture normalMap0 = assetManager.loadTexture("Textures/Terrain/splat/grass_normal.jpg");
128 Texture normalMap1 = assetManager.loadTexture("Textures/Terrain/splat/dirt_normal.png");
130 Texture normalMap2 = assetManager.loadTexture("Textures/Terrain/splat/road_normal.png");
154 // create the terrain as normal, and give it a control for LOD management
155 TerrainQuad terrainQuad = new TerrainQuad("terrain", 65, 129, heightmap.getHeightMap());//, new LodPerspectiveCalculatorFactory(getCamera(), 4)); // add this in to see it use entropy for LOD calculations
164 this.terrain = terrainQuad;
206 // we just use the exporter and pass in the terrain
207 BinaryExporter.getInstance().save((Savable)terrain, new BufferedOutputStream(fos));
231 // remove the existing terrain and detach it from the root node.
232 if (terrain != null) {
233 Node existingTerrain = (Node)terrain;
237 terrain = null;
240 // import the saved terrain, and attach it back to the root node
245 terrain = (TerrainQuad) imp.load(new BufferedInputStream(fis));
246 rootNode.attachChild((Node)terrain);
252 TerrainLodControl lodControl = ((Node)terrain).getControl(TerrainLodControl.class);
281 Terrain clone = (Terrain) ((Node)terrain).clone();
282 ((Node)terrain).removeFromParent();
283 terrain = clone;
284 getRootNode().attachChild((Node)terrain);
307 TerrainQuad terrain = new TerrainQuad("terrain", b, s, hm);
308 float[] hm2 = terrain.getHeightMap();
318 System.out.println("Terrain heightmap building FAILED!!!");
326 System.out.println("Terrain heightmap building PASSED");