- update test data, add list size check to TerrainGrid

git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@8698 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
3.0
nor..67 13 years ago
parent 534ab2f737
commit 9e18ec6184
  1. 2
      engine/src/terrain/com/jme3/terrain/geomipmap/TerrainGrid.java
  2. BIN
      engine/src/test-data/TerrainGrid/testgrid_-1_0_-1.j3o
  3. BIN
      engine/src/test-data/TerrainGrid/testgrid_-1_0_0.j3o
  4. BIN
      engine/src/test-data/TerrainGrid/testgrid_-1_0_1.j3o
  5. BIN
      engine/src/test-data/TerrainGrid/testgrid_-1_0_2.j3o
  6. BIN
      engine/src/test-data/TerrainGrid/testgrid_0_0_-1.j3o
  7. BIN
      engine/src/test-data/TerrainGrid/testgrid_0_0_-2.j3o
  8. BIN
      engine/src/test-data/TerrainGrid/testgrid_0_0_-3.j3o
  9. BIN
      engine/src/test-data/TerrainGrid/testgrid_0_0_0.j3o
  10. BIN
      engine/src/test-data/TerrainGrid/testgrid_0_0_2.j3o
  11. BIN
      engine/src/test-data/TerrainGrid/testgrid_0_0_3.j3o
  12. BIN
      engine/src/test-data/TerrainGrid/testgrid_1_0_-1.j3o
  13. BIN
      engine/src/test-data/TerrainGrid/testgrid_1_0_-2.j3o
  14. BIN
      engine/src/test-data/TerrainGrid/testgrid_1_0_-3.j3o
  15. BIN
      engine/src/test-data/TerrainGrid/testgrid_1_0_0.j3o
  16. BIN
      engine/src/test-data/TerrainGrid/testgrid_1_0_1.j3o
  17. BIN
      engine/src/test-data/TerrainGrid/testgrid_1_0_2.j3o
  18. BIN
      engine/src/test-data/TerrainGrid/testgrid_2_0_-1.j3o
  19. BIN
      engine/src/test-data/TerrainGrid/testgrid_2_0_-2.j3o
  20. BIN
      engine/src/test-data/TerrainGrid/testgrid_2_0_-3.j3o
  21. BIN
      engine/src/test-data/TerrainGrid/testgrid_2_0_-4.j3o
  22. BIN
      engine/src/test-data/TerrainGrid/testgrid_2_0_0.j3o
  23. BIN
      engine/src/test-data/TerrainGrid/testgrid_2_0_1.j3o
  24. BIN
      engine/src/test-data/TerrainGrid/testgrid_2_0_2.j3o
  25. BIN
      engine/src/test-data/TerrainGrid/testgrid_3_0_-1.j3o
  26. BIN
      engine/src/test-data/TerrainGrid/testgrid_3_0_-2.j3o
  27. BIN
      engine/src/test-data/TerrainGrid/testgrid_3_0_-3.j3o
  28. BIN
      engine/src/test-data/TerrainGrid/testgrid_3_0_-4.j3o
  29. BIN
      engine/src/test-data/TerrainGrid/testgrid_3_0_0.j3o
  30. BIN
      engine/src/test-data/TerrainGrid/testgrid_3_0_1.j3o
  31. BIN
      engine/src/test-data/TerrainGrid/testgrid_3_0_2.j3o
  32. BIN
      engine/src/test-data/TerrainGrid/testgrid_4_0_-1.j3o
  33. BIN
      engine/src/test-data/TerrainGrid/testgrid_4_0_-2.j3o
  34. BIN
      engine/src/test-data/TerrainGrid/testgrid_4_0_-3.j3o
  35. 3
      engine/src/test/jme3test/terrain/TerrainGridTest.java

@ -281,7 +281,7 @@ public class TerrainGrid extends TerrainQuad {
// to accept more, there are two ways:
// 1: every camera has an associated grid, then the location is not enough to identify which camera location has changed
// 2: grids are associated with locations, and no incremental update is done, we load new grids for new locations, and unload those that are not needed anymore
Vector3f cam = locations.get(0);
Vector3f cam = locations.size() == 0 ? Vector3f.ZERO.clone() : locations.get(0);
Vector3f camCell = this.getCamCell(cam); // get the grid index value of where the camera is (ie. 2,1)
if (cellsLoaded > 1) { // Check if cells are updated before updating gridoffset.
gridOffset[0] = Math.round(camCell.x * (size / 2));

@ -142,6 +142,9 @@ public class TerrainGridTest extends SimpleApplication {
}
public void tileAttached(Vector3f cell, TerrainQuad quad) {
while(quad.getControl(RigidBodyControl.class)!=null){
quad.removeControl(RigidBodyControl.class);
}
// try {
// BinaryExporter.getInstance().save(quad, new File("/Users/normenhansen/Documents/Code/jme3/engine/src/test-data/TerrainGrid/"
// + "testgrid_" + Math.round(cell.x) + "_" + Math.round(cell.y) + "_" + Math.round(cell.z) + ".j3o"));

Loading…
Cancel
Save