diff --git a/jme3-terrain/src/main/java/com/jme3/terrain/geomipmap/TerrainGrid.java b/jme3-terrain/src/main/java/com/jme3/terrain/geomipmap/TerrainGrid.java index 50e1f9f73..d232be924 100644 --- a/jme3-terrain/src/main/java/com/jme3/terrain/geomipmap/TerrainGrid.java +++ b/jme3-terrain/src/main/java/com/jme3/terrain/geomipmap/TerrainGrid.java @@ -43,7 +43,6 @@ import com.jme3.math.Vector3f; import com.jme3.scene.Spatial; import com.jme3.scene.control.UpdateControl; import com.jme3.terrain.Terrain; -import com.jme3.terrain.heightmap.HeightMap; import com.jme3.terrain.heightmap.HeightMapGrid; import java.io.IOException; import java.util.HashSet; @@ -114,7 +113,6 @@ public class TerrainGrid extends TerrainQuad { protected Vector3f currentCamCell = Vector3f.ZERO; protected int quarterSize; // half of quadSize protected int quadSize; - protected HeightMapGrid heightMapGrid; private TerrainGridTileLoader gridTileLoader; protected Vector3f[] quadIndex; protected Set listeners = new HashSet(); @@ -150,13 +148,7 @@ public class TerrainGrid extends TerrainQuad { final Vector3f quadCell = location.add(quadIndex[quadIdx]); TerrainQuad q = cache.get(quadCell); if (q == null) { - if (heightMapGrid != null) { - // create the new Quad since it doesn't exist - HeightMap heightMapAt = heightMapGrid.getHeightMapAt(quadCell); - q = new TerrainQuad(getName() + "Quad" + quadCell, patchSize, quadSize, heightMapAt == null ? null : heightMapAt.getHeightMap()); - q.setMaterial(material.clone()); - log.log(Level.FINE, "Loaded TerrainQuad {0} from HeightMapGrid", q.getName()); - } else if (gridTileLoader != null) { + if (gridTileLoader != null) { q = gridTileLoader.getTerrainQuadAt(quadCell); // only clone the material to the quad if it doesn't have a material of its own if(q.getMaterial()==null) q.setMaterial(material.clone()); diff --git a/jme3-terrain/src/main/java/com/jme3/terrain/heightmap/ImageBasedHeightMap.java b/jme3-terrain/src/main/java/com/jme3/terrain/heightmap/ImageBasedHeightMap.java index d4e9b22c8..0373c80eb 100644 --- a/jme3-terrain/src/main/java/com/jme3/terrain/heightmap/ImageBasedHeightMap.java +++ b/jme3-terrain/src/main/java/com/jme3/terrain/heightmap/ImageBasedHeightMap.java @@ -44,7 +44,7 @@ import com.jme3.texture.image.ImageRaster; * @author Mike Kienenberger * @version $id$ */ -public class ImageBasedHeightMap extends AbstractHeightMap implements ImageHeightmap { +public class ImageBasedHeightMap extends AbstractHeightMap { protected Image colorImage;