control.detachAndCleanUpControl(); else { control = new TerrainLodControl(terrain, cam); terrain.addControl(control);
List<Camera> cameras = new ArrayList<Camera>(); cameras.add(getCamera()); TerrainLodControl control = new TerrainLodControl(terrain, cameras); terrain.addControl(control); terrain.setMaterial(matRock);
List<Camera> cameras = new ArrayList<Camera>(); cameras.add(getCamera()); TerrainLodControl control = new TerrainLodControl(terrain, cameras); terrain.addControl(control); terrain.setMaterial(matRock);
TerrainLodControl control = new TerrainLodControl(terrain, getCamera()); control.setLodCalculator( new DistanceLodCalculator(65, 2.7f) ); // patch size, and a multiplier terrain.addControl(control);
TerrainLodControl control = new TerrainLodControl(terrainQuad, getCamera()); control.setLodCalculator( new DistanceLodCalculator(65, 2.7f) ); // patch size, and a multiplier terrainQuad.addControl(control);
TerrainLodControl control = new TerrainLodControl(terrain, getCamera()); control.setLodCalculator( new DistanceLodCalculator(65, 2.7f) ); // patch size, and a multiplier terrain.addControl(control);
TerrainLodControl control = new TerrainLodControl(terrain, cameras); terrain.addControl(control);
TerrainLodControl control = new TerrainLodControl(terrain, getCamera()); control.setLodCalculator( new DistanceLodCalculator(65, 2.7f) ); // patch size, and a multiplier terrain.addControl(control);
TerrainLodControl control = new TerrainLodControl(terrain, getCamera()); control.setLodCalculator( new DistanceLodCalculator(33, 2.7f) ); // patch size, and a multiplier terrain.addControl(control);
TerrainLodControl control = new TerrainLodControl(terrain, getCamera()); control.setLodCalculator( new DistanceLodCalculator(patchSize, 2.7f) ); // patch size, and a multiplier terrain.addControl(control);
TerrainLodControl control = new TerrainLodControl(terrain, getCamera()); control.setLodCalculator( new DistanceLodCalculator(65, 2.7f) ); terrain.addControl(control);
TerrainLodControl control = new TerrainLodControl(this.terrain, getCamera()); this.terrain.addControl(control);
TerrainLodControl control = new TerrainLodControl(terrain, getCamera()); control.setLodCalculator( new DistanceLodCalculator(65, 2.7f) ); // patch size, and a multiplier terrain.addControl(control);
public Control cloneForSpatial(Spatial spatial) { if (spatial instanceof Terrain) { List<Camera> cameraClone = new ArrayList<Camera>(); if (cameras != null) { for (Camera c : cameras) { cameraClone.add(c); } } TerrainLodControl cloned = new TerrainLodControl((Terrain) spatial, cameraClone); cloned.setLodCalculator(lodCalculator.clone()); return cloned; } return null; }
public void setStaticGeometry(Node staticNode) { this.staticNode = staticNode; // Add SKY direct to Root Spatial sky = staticNode.getChild("Skymap"); if(sky != null) { sky.removeFromParent(); this.rootNode.attachChild(sky); } // Add TERRAIN direct to Root Spatial terra = staticNode.getChild("Terrain"); if(terra != null) { terra.removeFromParent(); // ShadowMode mode = terra.getShadowMode(); terrain = (TerrainQuad)terra; terrain.setLocalTranslation(appScaled / 2, 0, appScaled / 2); this.rootNode.attachChild(terrain); /** 5. The LOD (level of detail) depends on were the camera is: */ TerrainLodControl control = new TerrainLodControl(terrain, cam); terrain.addControl(control); terrain.setShadowMode(ShadowMode.Receive); } GeometryBatchFactory.optimize(this.staticNode, true); this.rootNode.attachChild(this.staticNode); }