From 05f5473505db16f167db1d5cd451dca0f91b2a2e Mon Sep 17 00:00:00 2001 From: "bre..ns" Date: Tue, 21 Aug 2012 15:40:26 +0000 Subject: [PATCH] cleaned up some terrain code and deprecated a few constructors git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@9674 75d07b2b-3a1a-0410-a2c5-0572b91ccdca --- .../terrain/com/jme3/terrain/geomipmap/TerrainQuad.java | 3 +++ .../geomipmap/lodcalc/PerspectiveLodCalculator.java | 7 +------ 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/engine/src/terrain/com/jme3/terrain/geomipmap/TerrainQuad.java b/engine/src/terrain/com/jme3/terrain/geomipmap/TerrainQuad.java index 71a894f73..1df3087a7 100644 --- a/engine/src/terrain/com/jme3/terrain/geomipmap/TerrainQuad.java +++ b/engine/src/terrain/com/jme3/terrain/geomipmap/TerrainQuad.java @@ -135,6 +135,7 @@ public class TerrainQuad extends Node implements Terrain { * @param heightMap The height map to generate the terrain from (a flat * height map will be generated if this is null) */ + @Deprecated public TerrainQuad(String name, int patchSize, int quadSize, int totalSize, float[] heightMap) { this(name, patchSize, totalSize, quadSize, Vector3f.UNIT_XYZ, heightMap); } @@ -149,6 +150,7 @@ public class TerrainQuad extends Node implements Terrain { * @param heightMap The height map to generate the terrain from (a flat * height map will be generated if this is null) */ + @Deprecated public TerrainQuad(String name, int patchSize, int size, Vector3f scale, float[] heightMap) { this(name, patchSize, size, scale, heightMap, size, new Vector2f(), 0); affectedAreaBBox = new BoundingBox(new Vector3f(0,0,0), size*2, Float.MAX_VALUE, size*2); @@ -167,6 +169,7 @@ public class TerrainQuad extends Node implements Terrain { * @param heightMap The height map to generate the terrain from (a flat * height map will be generated if this is null) */ + @Deprecated public TerrainQuad(String name, int patchSize, int totalSize, int quadSize, Vector3f scale, float[] heightMap) { this(name, patchSize, quadSize, scale, heightMap, totalSize, new Vector2f(), 0); affectedAreaBBox = new BoundingBox(new Vector3f(0,0,0), totalSize*2, Float.MAX_VALUE, totalSize*2); diff --git a/engine/src/terrain/com/jme3/terrain/geomipmap/lodcalc/PerspectiveLodCalculator.java b/engine/src/terrain/com/jme3/terrain/geomipmap/lodcalc/PerspectiveLodCalculator.java index 834695f47..59a4e831f 100644 --- a/engine/src/terrain/com/jme3/terrain/geomipmap/lodcalc/PerspectiveLodCalculator.java +++ b/engine/src/terrain/com/jme3/terrain/geomipmap/lodcalc/PerspectiveLodCalculator.java @@ -45,7 +45,6 @@ import java.util.List; public class PerspectiveLodCalculator implements LodCalculator { - private TerrainPatch patch; private Camera cam; private float[] entropyDistances; private float pixelError; @@ -74,11 +73,7 @@ public class PerspectiveLodCalculator implements LodCalculator { return A / T; } - public boolean calculateLod(List locations, HashMap updates) { - return calculateLod(patch, locations, updates); - } - - public boolean calculateLod(TerrainPatch terrainPatch, List locations, HashMap updates) { + public boolean calculateLod(TerrainPatch patch, List locations, HashMap updates) { if (entropyDistances == null){ // compute entropy distances float[] lodEntropies = patch.getLodEntropies();