private HeightMap getHeightMapAt(Vector3f location) { AbstractHeightMap heightmap = null; FloatBuffer buffer = this.base.getBuffer(location.x * (this.quadSize - 1), location.z * (this.quadSize - 1), 0, this.quadSize); float[] arr = buffer.array(); for (int i = 0; i < arr.length; i++) { arr[i] = arr[i] * this.heightScale; } heightmap = new FloatBufferHeightMap(buffer); heightmap.load(); return heightmap; }
heightmap.load();
try { heightmap = new ImageBasedHeightMap(heightMapImage.getImage(), 0.25f); heightmap.load(); } catch (Exception e) { e.printStackTrace();
try { heightmap = new ImageBasedHeightMap(heightMapImage.getImage(), 0.25f); heightmap.load(); } catch (Exception e) { e.printStackTrace();
try { heightmap = new ImageBasedHeightMap(heightMapImage.getImage(), 0.25f); heightmap.load(); } catch (Exception e) { e.printStackTrace();
try { heightmap = new ImageBasedHeightMap(heightMapImage.getImage(), 0.25f); heightmap.load(); } catch (Exception e) { e.printStackTrace();
try { heightmap = new ImageBasedHeightMap(heightMapImage.getImage(), 0.25f); heightmap.load();
try { heightmap = new ImageBasedHeightMap(heightMapImage.getImage(), 0.25f); heightmap.load(); } catch (Exception e) { e.printStackTrace();
try { heightmap = new ImageBasedHeightMap(heightMapImage.getImage(), 0.5f); heightmap.load(); heightmap.smooth(0.9f, 1);
try { heightmap = new ImageBasedHeightMap(heightMapImage.getImage(), 1f); heightmap.load();
"Textures/Terrain/splat/mountains512.png"); heightmap = new ImageBasedHeightMap(heightMapImage.getImage()); heightmap.load();
try { heightmap = new ImageBasedHeightMap(heightMapImage.getImage(), 0.25f); heightmap.load();
heightmap.load();
try { heightmap = new ImageBasedHeightMap(heightMapImage.getImage(), 1f); heightmap.load();
heightmap.load();
heightmap.load();
try { heightmap = new ImageBasedHeightMap(heightMapImage.getImage(), 0.3f); heightmap.load(); heightmap.smooth(0.9f, 1);
private HeightMap getHeightMapAt(Vector3f location) { AbstractHeightMap heightmap = null; FloatBuffer buffer = this.base.getBuffer(location.x * (this.quadSize - 1), location.z * (this.quadSize - 1), 0, this.quadSize); float[] arr = buffer.array(); for (int i = 0; i < arr.length; i++) { arr[i] = arr[i] * this.heightScale; } heightmap = new FloatBufferHeightMap(buffer); heightmap.load(); return heightmap; }
public HeightMap getHeightMapAt(Vector3f location) { // HEIGHTMAP image (for the terrain heightmap) int x = (int) location.x; int z = (int) location.z; AbstractHeightMap heightmap = null; //BufferedImage im = null; try { String name = namer.getName(x, z); logger.log(Level.FINE, "Loading heightmap from file: {0}", name); final Texture texture = assetManager.loadTexture(new TextureKey(name)); // CREATE HEIGHTMAP heightmap = new ImageBasedHeightMap(texture.getImage()); heightmap.setHeightScale(1); heightmap.load(); } catch (AssetNotFoundException e) { logger.log(Level.SEVERE, "Asset Not found! ", e); } return heightmap; }
heightmap.load();