diff --git a/engine/src/bullet/com/jme3/bullet/util/CollisionShapeFactory.java b/engine/src/bullet/com/jme3/bullet/util/CollisionShapeFactory.java index cc15bd508..b56a355bf 100644 --- a/engine/src/bullet/com/jme3/bullet/util/CollisionShapeFactory.java +++ b/engine/src/bullet/com/jme3/bullet/util/CollisionShapeFactory.java @@ -130,7 +130,7 @@ public class CollisionShapeFactory { } TerrainPatch terrain = (TerrainPatch) spatial; Transform trans = getTransform(spatial, realRootNode); - shape.addChildShape(new HeightfieldCollisionShape(terrain.getHeightmap(), terrain.getLocalScale()), + shape.addChildShape(new HeightfieldCollisionShape(terrain.getHeightMap(), terrain.getLocalScale()), trans.getTranslation(), trans.getRotation().toRotationMatrix()); } @@ -175,7 +175,7 @@ public class CollisionShapeFactory { return new HeightfieldCollisionShape(terrain.getHeightMap(), terrain.getLocalScale()); } else if (spatial instanceof TerrainPatch) { TerrainPatch terrain = (TerrainPatch) spatial; - return new HeightfieldCollisionShape(terrain.getHeightmap(), terrain.getLocalScale()); + return new HeightfieldCollisionShape(terrain.getHeightMap(), terrain.getLocalScale()); } else if (spatial instanceof Geometry) { return createSingleMeshShape((Geometry) spatial, spatial); } else if (spatial instanceof Node) { diff --git a/engine/src/jbullet/com/jme3/bullet/util/CollisionShapeFactory.java b/engine/src/jbullet/com/jme3/bullet/util/CollisionShapeFactory.java index cc15bd508..b56a355bf 100644 --- a/engine/src/jbullet/com/jme3/bullet/util/CollisionShapeFactory.java +++ b/engine/src/jbullet/com/jme3/bullet/util/CollisionShapeFactory.java @@ -130,7 +130,7 @@ public class CollisionShapeFactory { } TerrainPatch terrain = (TerrainPatch) spatial; Transform trans = getTransform(spatial, realRootNode); - shape.addChildShape(new HeightfieldCollisionShape(terrain.getHeightmap(), terrain.getLocalScale()), + shape.addChildShape(new HeightfieldCollisionShape(terrain.getHeightMap(), terrain.getLocalScale()), trans.getTranslation(), trans.getRotation().toRotationMatrix()); } @@ -175,7 +175,7 @@ public class CollisionShapeFactory { return new HeightfieldCollisionShape(terrain.getHeightMap(), terrain.getLocalScale()); } else if (spatial instanceof TerrainPatch) { TerrainPatch terrain = (TerrainPatch) spatial; - return new HeightfieldCollisionShape(terrain.getHeightmap(), terrain.getLocalScale()); + return new HeightfieldCollisionShape(terrain.getHeightMap(), terrain.getLocalScale()); } else if (spatial instanceof Geometry) { return createSingleMeshShape((Geometry) spatial, spatial); } else if (spatial instanceof Node) { diff --git a/engine/src/terrain/com/jme3/terrain/geomipmap/TerrainPatch.java b/engine/src/terrain/com/jme3/terrain/geomipmap/TerrainPatch.java index 756532003..dfa7d9318 100644 --- a/engine/src/terrain/com/jme3/terrain/geomipmap/TerrainPatch.java +++ b/engine/src/terrain/com/jme3/terrain/geomipmap/TerrainPatch.java @@ -213,7 +213,12 @@ public class TerrainPatch extends Geometry { return lodEntropy; } - public float[] getHeightmap() { + @Deprecated + public FloatBuffer getHeightmap() { + return BufferUtils.createFloatBuffer(geomap.getHeightData()); + } + + public float[] getHeightMap() { return geomap.getHeightData(); } diff --git a/engine/src/terrain/com/jme3/terrain/geomipmap/TerrainQuad.java b/engine/src/terrain/com/jme3/terrain/geomipmap/TerrainQuad.java index f94b6a064..8f03eaf3d 100644 --- a/engine/src/terrain/com/jme3/terrain/geomipmap/TerrainQuad.java +++ b/engine/src/terrain/com/jme3/terrain/geomipmap/TerrainQuad.java @@ -1796,13 +1796,13 @@ public class TerrainQuad extends Node implements Terrain { if (getChild(0) instanceof TerrainPatch) { for (Spatial s : getChildren()) { if ( ((TerrainPatch)s).getQuadrant() == 1) - ul = ((TerrainPatch)s).getHeightmap(); + ul = ((TerrainPatch)s).getHeightMap(); else if(((TerrainPatch) s).getQuadrant() == 2) - bl = ((TerrainPatch)s).getHeightmap(); + bl = ((TerrainPatch)s).getHeightMap(); else if(((TerrainPatch) s).getQuadrant() == 3) - ur = ((TerrainPatch)s).getHeightmap(); + ur = ((TerrainPatch)s).getHeightMap(); else if(((TerrainPatch) s).getQuadrant() == 4) - br = ((TerrainPatch)s).getHeightmap(); + br = ((TerrainPatch)s).getHeightMap(); } } else {