- rename TerrainQuadGrid -> TerrainGridTileLoader, AssetQuadGrid -> AssetTileLoader

git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@8693 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
3.0
nor..67 13 years ago
parent 4d9783ec81
commit b087c3e843
  1. 10
      engine/src/terrain/com/jme3/terrain/geomipmap/TerrainGrid.java
  2. 2
      engine/src/terrain/com/jme3/terrain/geomipmap/TerrainGridTileLoader.java
  3. 8
      engine/src/terrain/com/jme3/terrain/geomipmap/grid/AssetTileLoader.java
  4. 4
      engine/src/test/jme3test/terrain/TerrainQuadGridTest.java

@ -106,7 +106,7 @@ public class TerrainGrid extends TerrainQuad {
protected int quarterSize;
protected int quadSize;
protected HeightMapGrid heightMapGrid;
protected TerrainQuadGrid terrainQuadGrid;
protected TerrainGridTileLoader terrainQuadGrid;
protected Vector3f[] quadIndex;
protected Map<String, TerrainGridListener> listeners = new HashMap<String, TerrainGridListener>();
protected Material material;
@ -191,7 +191,7 @@ public class TerrainGrid extends TerrainQuad {
return 0; // error
}
public TerrainGrid(String name, int patchSize, int maxVisibleSize, Vector3f scale, TerrainQuadGrid terrainQuadGrid,
public TerrainGrid(String name, int patchSize, int maxVisibleSize, Vector3f scale, TerrainGridTileLoader terrainQuadGrid,
Vector2f offset, float offsetAmount) {
this.name = name;
this.patchSize = patchSize;
@ -206,11 +206,11 @@ public class TerrainGrid extends TerrainQuad {
terrainQuadGrid.setQuadSize(this.quadSize);
}
public TerrainGrid(String name, int patchSize, int maxVisibleSize, Vector3f scale, TerrainQuadGrid terrainQuadGrid) {
public TerrainGrid(String name, int patchSize, int maxVisibleSize, Vector3f scale, TerrainGridTileLoader terrainQuadGrid) {
this(name, patchSize, maxVisibleSize, scale, terrainQuadGrid, new Vector2f(), 0);
}
public TerrainGrid(String name, int patchSize, int maxVisibleSize, TerrainQuadGrid terrainQuadGrid) {
public TerrainGrid(String name, int patchSize, int maxVisibleSize, TerrainGridTileLoader terrainQuadGrid) {
this(name, patchSize, maxVisibleSize, Vector3f.UNIT_XYZ, terrainQuadGrid);
}
@ -450,7 +450,7 @@ public class TerrainGrid extends TerrainQuad {
stepScale = (Vector3f) c.readSavable("stepScale", null);
offset = (Vector2f) c.readSavable("offset", null);
offsetAmount = c.readFloat("offsetAmount", 0);
terrainQuadGrid = (TerrainQuadGrid) c.readSavable("terrainQuadGrid", null);
terrainQuadGrid = (TerrainGridTileLoader) c.readSavable("terrainQuadGrid", null);
material = (Material) c.readSavable("material", null);
initData();
if (terrainQuadGrid != null) {

@ -11,7 +11,7 @@ import com.jme3.math.Vector3f;
*
* @author normenhansen
*/
public interface TerrainQuadGrid extends Savable {
public interface TerrainGridTileLoader extends Savable {
public TerrainQuad getTerrainQuadAt(Vector3f location);

@ -11,7 +11,7 @@ import com.jme3.export.JmeImporter;
import com.jme3.export.OutputCapsule;
import com.jme3.math.Vector3f;
import com.jme3.terrain.geomipmap.TerrainQuad;
import com.jme3.terrain.geomipmap.TerrainQuadGrid;
import com.jme3.terrain.geomipmap.TerrainGridTileLoader;
import java.io.IOException;
import java.util.logging.Level;
import java.util.logging.Logger;
@ -20,7 +20,7 @@ import java.util.logging.Logger;
*
* @author normenhansen
*/
public class AssetQuadGrid implements TerrainQuadGrid {
public class AssetTileLoader implements TerrainGridTileLoader {
private AssetManager manager;
private String assetPath;
@ -29,10 +29,10 @@ public class AssetQuadGrid implements TerrainQuadGrid {
private int patchSize;
private int quadSize;
public AssetQuadGrid() {
public AssetTileLoader() {
}
public AssetQuadGrid(AssetManager manager, String name, String assetPath) {
public AssetTileLoader(AssetManager manager, String name, String assetPath) {
this.manager = manager;
this.name = name;
this.assetPath = assetPath;

@ -20,7 +20,7 @@ import com.jme3.terrain.geomipmap.TerrainGrid;
import com.jme3.terrain.geomipmap.TerrainGridListener;
import com.jme3.terrain.geomipmap.TerrainLodControl;
import com.jme3.terrain.geomipmap.TerrainQuad;
import com.jme3.terrain.geomipmap.grid.AssetQuadGrid;
import com.jme3.terrain.geomipmap.grid.AssetTileLoader;
import com.jme3.terrain.geomipmap.lodcalc.DistanceLodCalculator;
import com.jme3.texture.Texture;
import com.jme3.texture.Texture.WrapMode;
@ -97,7 +97,7 @@ public class TerrainQuadGridTest extends SimpleApplication {
this.mat_terrain.setFloat("terrainSize", 129);
//quad.getHeightMap(), terrain.getLocalScale()), 0
AssetQuadGrid grid = new AssetQuadGrid(assetManager, "testgrid", "TerrainGrid");
AssetTileLoader grid = new AssetTileLoader(assetManager, "testgrid", "TerrainGrid");
this.terrain = new TerrainGrid("terrain", 65, 257, grid);
this.terrain.setMaterial(this.mat_terrain);

Loading…
Cancel
Save