- fix FractalTileLoader using patchSize instead of quadSize

git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@8701 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
3.0
nor..67 13 years ago
parent 9a5bb23687
commit 49d64f3423
  1. 4
      engine/src/terrain/com/jme3/terrain/geomipmap/grid/FractalTileLoader.java

@ -63,9 +63,9 @@ public class FractalTileLoader implements TerrainGridTileLoader{
heightmap.setHeightScale(heightScale);
} catch (IOException e) {}
} else {
FloatBuffer buffer = this.base.getBuffer(location.x * (this.patchSize - 1), location.z * (this.patchSize - 1), 0, this.patchSize);
FloatBuffer buffer = this.base.getBuffer(location.x * (this.quadSize - 1), location.z * (this.quadSize - 1), 0, this.quadSize);
if (this.cacheDir != null) {
MapUtils.saveImage(MapUtils.toGrayscale16Image(buffer, this.patchSize), new File(this.cacheDir, "terrain_" + (int) location.x
MapUtils.saveImage(MapUtils.toGrayscale16Image(buffer, this.quadSize), new File(this.cacheDir, "terrain_" + (int) location.x
+ "_" + (int) location.z + ".png"));
}
float[] arr = buffer.array();

Loading…
Cancel
Save