diff --git a/engine/src/test-data/TerrainGrid/testgrid_-1_0_-1.j3o b/engine/src/test-data/TerrainGrid/testgrid_-1_0_-1.j3o index a952cb2ac..28d051615 100644 Binary files a/engine/src/test-data/TerrainGrid/testgrid_-1_0_-1.j3o and b/engine/src/test-data/TerrainGrid/testgrid_-1_0_-1.j3o differ diff --git a/engine/src/test-data/TerrainGrid/testgrid_-1_0_-2.j3o b/engine/src/test-data/TerrainGrid/testgrid_-1_0_-2.j3o index 6941c4f57..e2894e1c2 100644 Binary files a/engine/src/test-data/TerrainGrid/testgrid_-1_0_-2.j3o and b/engine/src/test-data/TerrainGrid/testgrid_-1_0_-2.j3o differ diff --git a/engine/src/test-data/TerrainGrid/testgrid_-1_0_-3.j3o b/engine/src/test-data/TerrainGrid/testgrid_-1_0_-3.j3o new file mode 100644 index 000000000..c7aa76b47 Binary files /dev/null and b/engine/src/test-data/TerrainGrid/testgrid_-1_0_-3.j3o differ diff --git a/engine/src/test-data/TerrainGrid/testgrid_-1_0_0.j3o b/engine/src/test-data/TerrainGrid/testgrid_-1_0_0.j3o index 7f5d86a29..5c2e68def 100644 Binary files a/engine/src/test-data/TerrainGrid/testgrid_-1_0_0.j3o and b/engine/src/test-data/TerrainGrid/testgrid_-1_0_0.j3o differ diff --git a/engine/src/test-data/TerrainGrid/testgrid_-1_0_1.j3o b/engine/src/test-data/TerrainGrid/testgrid_-1_0_1.j3o index 50eecb202..bdd3ffe88 100644 Binary files a/engine/src/test-data/TerrainGrid/testgrid_-1_0_1.j3o and b/engine/src/test-data/TerrainGrid/testgrid_-1_0_1.j3o differ diff --git a/engine/src/test-data/TerrainGrid/testgrid_-1_0_2.j3o b/engine/src/test-data/TerrainGrid/testgrid_-1_0_2.j3o new file mode 100644 index 000000000..877d8d895 Binary files /dev/null and b/engine/src/test-data/TerrainGrid/testgrid_-1_0_2.j3o differ diff --git a/engine/src/test-data/TerrainGrid/testgrid_-1_0_3.j3o b/engine/src/test-data/TerrainGrid/testgrid_-1_0_3.j3o new file mode 100644 index 000000000..f34a4e819 Binary files /dev/null and b/engine/src/test-data/TerrainGrid/testgrid_-1_0_3.j3o differ diff --git a/engine/src/test-data/TerrainGrid/testgrid_-2_0_-1.j3o b/engine/src/test-data/TerrainGrid/testgrid_-2_0_-1.j3o new file mode 100644 index 000000000..02f491d3f Binary files /dev/null and b/engine/src/test-data/TerrainGrid/testgrid_-2_0_-1.j3o differ diff --git a/engine/src/test-data/TerrainGrid/testgrid_-2_0_-2.j3o b/engine/src/test-data/TerrainGrid/testgrid_-2_0_-2.j3o new file mode 100644 index 000000000..945375240 Binary files /dev/null and b/engine/src/test-data/TerrainGrid/testgrid_-2_0_-2.j3o differ diff --git a/engine/src/test-data/TerrainGrid/testgrid_-2_0_0.j3o b/engine/src/test-data/TerrainGrid/testgrid_-2_0_0.j3o new file mode 100644 index 000000000..476e5a288 Binary files /dev/null and b/engine/src/test-data/TerrainGrid/testgrid_-2_0_0.j3o differ diff --git a/engine/src/test-data/TerrainGrid/testgrid_-2_0_1.j3o b/engine/src/test-data/TerrainGrid/testgrid_-2_0_1.j3o new file mode 100644 index 000000000..bb7cbbeab Binary files /dev/null and b/engine/src/test-data/TerrainGrid/testgrid_-2_0_1.j3o differ diff --git a/engine/src/test-data/TerrainGrid/testgrid_-2_0_2.j3o b/engine/src/test-data/TerrainGrid/testgrid_-2_0_2.j3o new file mode 100644 index 000000000..f40f68ef6 Binary files /dev/null and b/engine/src/test-data/TerrainGrid/testgrid_-2_0_2.j3o differ diff --git a/engine/src/test-data/TerrainGrid/testgrid_-2_0_3.j3o b/engine/src/test-data/TerrainGrid/testgrid_-2_0_3.j3o new file mode 100644 index 000000000..3a90f7241 Binary files /dev/null and b/engine/src/test-data/TerrainGrid/testgrid_-2_0_3.j3o differ diff --git a/engine/src/test-data/TerrainGrid/testgrid_0_0_-1.j3o b/engine/src/test-data/TerrainGrid/testgrid_0_0_-1.j3o index 916b15f1d..0928b3334 100644 Binary files a/engine/src/test-data/TerrainGrid/testgrid_0_0_-1.j3o and b/engine/src/test-data/TerrainGrid/testgrid_0_0_-1.j3o differ diff --git a/engine/src/test-data/TerrainGrid/testgrid_0_0_-2.j3o b/engine/src/test-data/TerrainGrid/testgrid_0_0_-2.j3o index d8a4fb976..30f591eb7 100644 Binary files a/engine/src/test-data/TerrainGrid/testgrid_0_0_-2.j3o and b/engine/src/test-data/TerrainGrid/testgrid_0_0_-2.j3o differ diff --git a/engine/src/test-data/TerrainGrid/testgrid_0_0_-3.j3o b/engine/src/test-data/TerrainGrid/testgrid_0_0_-3.j3o new file mode 100644 index 000000000..04c47458d Binary files /dev/null and b/engine/src/test-data/TerrainGrid/testgrid_0_0_-3.j3o differ diff --git a/engine/src/test-data/TerrainGrid/testgrid_0_0_-4.j3o b/engine/src/test-data/TerrainGrid/testgrid_0_0_-4.j3o new file mode 100644 index 000000000..411f49d88 Binary files /dev/null and b/engine/src/test-data/TerrainGrid/testgrid_0_0_-4.j3o differ diff --git a/engine/src/test-data/TerrainGrid/testgrid_0_0_-5.j3o b/engine/src/test-data/TerrainGrid/testgrid_0_0_-5.j3o new file mode 100644 index 000000000..6c0793880 Binary files /dev/null and b/engine/src/test-data/TerrainGrid/testgrid_0_0_-5.j3o differ diff --git a/engine/src/test-data/TerrainGrid/testgrid_0_0_0.j3o b/engine/src/test-data/TerrainGrid/testgrid_0_0_0.j3o index aadd9f13d..bec5c0e73 100644 Binary files a/engine/src/test-data/TerrainGrid/testgrid_0_0_0.j3o and b/engine/src/test-data/TerrainGrid/testgrid_0_0_0.j3o differ diff --git a/engine/src/test-data/TerrainGrid/testgrid_0_0_1.j3o b/engine/src/test-data/TerrainGrid/testgrid_0_0_1.j3o index 9f88d20b3..75d4ef9f5 100644 Binary files a/engine/src/test-data/TerrainGrid/testgrid_0_0_1.j3o and b/engine/src/test-data/TerrainGrid/testgrid_0_0_1.j3o differ diff --git a/engine/src/test-data/TerrainGrid/testgrid_0_0_2.j3o b/engine/src/test-data/TerrainGrid/testgrid_0_0_2.j3o index 441203b0e..b956c967a 100644 Binary files a/engine/src/test-data/TerrainGrid/testgrid_0_0_2.j3o and b/engine/src/test-data/TerrainGrid/testgrid_0_0_2.j3o differ diff --git a/engine/src/test-data/TerrainGrid/testgrid_0_0_3.j3o b/engine/src/test-data/TerrainGrid/testgrid_0_0_3.j3o new file mode 100644 index 000000000..fecb642a8 Binary files /dev/null and b/engine/src/test-data/TerrainGrid/testgrid_0_0_3.j3o differ diff --git a/engine/src/test-data/TerrainGrid/testgrid_1_0_-1.j3o b/engine/src/test-data/TerrainGrid/testgrid_1_0_-1.j3o index 77ba82fdc..956326d17 100644 Binary files a/engine/src/test-data/TerrainGrid/testgrid_1_0_-1.j3o and b/engine/src/test-data/TerrainGrid/testgrid_1_0_-1.j3o differ diff --git a/engine/src/test-data/TerrainGrid/testgrid_1_0_-2.j3o b/engine/src/test-data/TerrainGrid/testgrid_1_0_-2.j3o index 31a88721a..8ca3077de 100644 Binary files a/engine/src/test-data/TerrainGrid/testgrid_1_0_-2.j3o and b/engine/src/test-data/TerrainGrid/testgrid_1_0_-2.j3o differ diff --git a/engine/src/test-data/TerrainGrid/testgrid_1_0_-3.j3o b/engine/src/test-data/TerrainGrid/testgrid_1_0_-3.j3o new file mode 100644 index 000000000..b6d701bfa Binary files /dev/null and b/engine/src/test-data/TerrainGrid/testgrid_1_0_-3.j3o differ diff --git a/engine/src/test-data/TerrainGrid/testgrid_1_0_-4.j3o b/engine/src/test-data/TerrainGrid/testgrid_1_0_-4.j3o new file mode 100644 index 000000000..7b32c18e8 Binary files /dev/null and b/engine/src/test-data/TerrainGrid/testgrid_1_0_-4.j3o differ diff --git a/engine/src/test-data/TerrainGrid/testgrid_1_0_-5.j3o b/engine/src/test-data/TerrainGrid/testgrid_1_0_-5.j3o new file mode 100644 index 000000000..924a01186 Binary files /dev/null and b/engine/src/test-data/TerrainGrid/testgrid_1_0_-5.j3o differ diff --git a/engine/src/test-data/TerrainGrid/testgrid_1_0_0.j3o b/engine/src/test-data/TerrainGrid/testgrid_1_0_0.j3o index 0f804d6a3..864a9bb42 100644 Binary files a/engine/src/test-data/TerrainGrid/testgrid_1_0_0.j3o and b/engine/src/test-data/TerrainGrid/testgrid_1_0_0.j3o differ diff --git a/engine/src/test-data/TerrainGrid/testgrid_1_0_1.j3o b/engine/src/test-data/TerrainGrid/testgrid_1_0_1.j3o index a1f5d09f2..b757550ed 100644 Binary files a/engine/src/test-data/TerrainGrid/testgrid_1_0_1.j3o and b/engine/src/test-data/TerrainGrid/testgrid_1_0_1.j3o differ diff --git a/engine/src/test-data/TerrainGrid/testgrid_1_0_2.j3o b/engine/src/test-data/TerrainGrid/testgrid_1_0_2.j3o index 1cc2da563..0736dac7b 100644 Binary files a/engine/src/test-data/TerrainGrid/testgrid_1_0_2.j3o and b/engine/src/test-data/TerrainGrid/testgrid_1_0_2.j3o differ diff --git a/engine/src/test-data/TerrainGrid/testgrid_1_0_3.j3o b/engine/src/test-data/TerrainGrid/testgrid_1_0_3.j3o new file mode 100644 index 000000000..eb30d64f8 Binary files /dev/null and b/engine/src/test-data/TerrainGrid/testgrid_1_0_3.j3o differ diff --git a/engine/src/test-data/TerrainGrid/testgrid_2_0_-1.j3o b/engine/src/test-data/TerrainGrid/testgrid_2_0_-1.j3o index 35d0925c1..368a20d57 100644 Binary files a/engine/src/test-data/TerrainGrid/testgrid_2_0_-1.j3o and b/engine/src/test-data/TerrainGrid/testgrid_2_0_-1.j3o differ diff --git a/engine/src/test-data/TerrainGrid/testgrid_2_0_-2.j3o b/engine/src/test-data/TerrainGrid/testgrid_2_0_-2.j3o new file mode 100644 index 000000000..4d746e105 Binary files /dev/null and b/engine/src/test-data/TerrainGrid/testgrid_2_0_-2.j3o differ diff --git a/engine/src/test-data/TerrainGrid/testgrid_2_0_-3.j3o b/engine/src/test-data/TerrainGrid/testgrid_2_0_-3.j3o new file mode 100644 index 000000000..aa7a0bc70 Binary files /dev/null and b/engine/src/test-data/TerrainGrid/testgrid_2_0_-3.j3o differ diff --git a/engine/src/test-data/TerrainGrid/testgrid_2_0_-4.j3o b/engine/src/test-data/TerrainGrid/testgrid_2_0_-4.j3o new file mode 100644 index 000000000..0a7686273 Binary files /dev/null and b/engine/src/test-data/TerrainGrid/testgrid_2_0_-4.j3o differ diff --git a/engine/src/test-data/TerrainGrid/testgrid_2_0_-5.j3o b/engine/src/test-data/TerrainGrid/testgrid_2_0_-5.j3o new file mode 100644 index 000000000..f5cbb37c0 Binary files /dev/null and b/engine/src/test-data/TerrainGrid/testgrid_2_0_-5.j3o differ diff --git a/engine/src/test-data/TerrainGrid/testgrid_2_0_0.j3o b/engine/src/test-data/TerrainGrid/testgrid_2_0_0.j3o index 9afa3eee2..8cae48a63 100644 Binary files a/engine/src/test-data/TerrainGrid/testgrid_2_0_0.j3o and b/engine/src/test-data/TerrainGrid/testgrid_2_0_0.j3o differ diff --git a/engine/src/test-data/TerrainGrid/testgrid_2_0_1.j3o b/engine/src/test-data/TerrainGrid/testgrid_2_0_1.j3o index 716703dc9..e6548689f 100644 Binary files a/engine/src/test-data/TerrainGrid/testgrid_2_0_1.j3o and b/engine/src/test-data/TerrainGrid/testgrid_2_0_1.j3o differ diff --git a/engine/src/test-data/TerrainGrid/testgrid_2_0_2.j3o b/engine/src/test-data/TerrainGrid/testgrid_2_0_2.j3o index 9f20819ae..171a112a4 100644 Binary files a/engine/src/test-data/TerrainGrid/testgrid_2_0_2.j3o and b/engine/src/test-data/TerrainGrid/testgrid_2_0_2.j3o differ diff --git a/engine/src/test-data/TerrainGrid/testgrid_2_0_3.j3o b/engine/src/test-data/TerrainGrid/testgrid_2_0_3.j3o new file mode 100644 index 000000000..9b9e4c71d Binary files /dev/null and b/engine/src/test-data/TerrainGrid/testgrid_2_0_3.j3o differ diff --git a/engine/src/test-data/TerrainGrid/testgrid_3_0_-1.j3o b/engine/src/test-data/TerrainGrid/testgrid_3_0_-1.j3o new file mode 100644 index 000000000..aa287eace Binary files /dev/null and b/engine/src/test-data/TerrainGrid/testgrid_3_0_-1.j3o differ diff --git a/engine/src/test-data/TerrainGrid/testgrid_3_0_-2.j3o b/engine/src/test-data/TerrainGrid/testgrid_3_0_-2.j3o new file mode 100644 index 000000000..483c75019 Binary files /dev/null and b/engine/src/test-data/TerrainGrid/testgrid_3_0_-2.j3o differ diff --git a/engine/src/test-data/TerrainGrid/testgrid_3_0_-3.j3o b/engine/src/test-data/TerrainGrid/testgrid_3_0_-3.j3o new file mode 100644 index 000000000..ea4efec55 Binary files /dev/null and b/engine/src/test-data/TerrainGrid/testgrid_3_0_-3.j3o differ diff --git a/engine/src/test-data/TerrainGrid/testgrid_3_0_-4.j3o b/engine/src/test-data/TerrainGrid/testgrid_3_0_-4.j3o new file mode 100644 index 000000000..af266e686 Binary files /dev/null and b/engine/src/test-data/TerrainGrid/testgrid_3_0_-4.j3o differ diff --git a/engine/src/test-data/TerrainGrid/testgrid_3_0_-5.j3o b/engine/src/test-data/TerrainGrid/testgrid_3_0_-5.j3o new file mode 100644 index 000000000..8cc63aa97 Binary files /dev/null and b/engine/src/test-data/TerrainGrid/testgrid_3_0_-5.j3o differ diff --git a/engine/src/test-data/TerrainGrid/testgrid_3_0_0.j3o b/engine/src/test-data/TerrainGrid/testgrid_3_0_0.j3o new file mode 100644 index 000000000..737a8f901 Binary files /dev/null and b/engine/src/test-data/TerrainGrid/testgrid_3_0_0.j3o differ diff --git a/engine/src/test-data/TerrainGrid/testgrid_3_0_1.j3o b/engine/src/test-data/TerrainGrid/testgrid_3_0_1.j3o new file mode 100644 index 000000000..cea76f5fd Binary files /dev/null and b/engine/src/test-data/TerrainGrid/testgrid_3_0_1.j3o differ diff --git a/engine/src/test-data/TerrainGrid/testgrid_3_0_2.j3o b/engine/src/test-data/TerrainGrid/testgrid_3_0_2.j3o new file mode 100644 index 000000000..5994019a0 Binary files /dev/null and b/engine/src/test-data/TerrainGrid/testgrid_3_0_2.j3o differ diff --git a/engine/src/test-data/TerrainGrid/testgrid_3_0_3.j3o b/engine/src/test-data/TerrainGrid/testgrid_3_0_3.j3o new file mode 100644 index 000000000..43fe44eeb Binary files /dev/null and b/engine/src/test-data/TerrainGrid/testgrid_3_0_3.j3o differ diff --git a/engine/src/test-data/TerrainGrid/testgrid_4_0_-2.j3o b/engine/src/test-data/TerrainGrid/testgrid_4_0_-2.j3o new file mode 100644 index 000000000..66b3447e1 Binary files /dev/null and b/engine/src/test-data/TerrainGrid/testgrid_4_0_-2.j3o differ diff --git a/engine/src/test-data/TerrainGrid/testgrid_4_0_-3.j3o b/engine/src/test-data/TerrainGrid/testgrid_4_0_-3.j3o new file mode 100644 index 000000000..f8825db29 Binary files /dev/null and b/engine/src/test-data/TerrainGrid/testgrid_4_0_-3.j3o differ diff --git a/engine/src/test-data/TerrainGrid/testgrid_4_0_-4.j3o b/engine/src/test-data/TerrainGrid/testgrid_4_0_-4.j3o new file mode 100644 index 000000000..ccf3ed74c Binary files /dev/null and b/engine/src/test-data/TerrainGrid/testgrid_4_0_-4.j3o differ diff --git a/engine/src/test/jme3test/terrain/TerrainGridTest.java b/engine/src/test/jme3test/terrain/TerrainGridTest.java index 747fcebcd..8c7a700e6 100644 --- a/engine/src/test/jme3test/terrain/TerrainGridTest.java +++ b/engine/src/test/jme3test/terrain/TerrainGridTest.java @@ -9,6 +9,7 @@ import com.jme3.bullet.collision.shapes.CapsuleCollisionShape; import com.jme3.bullet.collision.shapes.HeightfieldCollisionShape; import com.jme3.bullet.control.CharacterControl; import com.jme3.bullet.control.RigidBodyControl; +import com.jme3.export.binary.BinaryExporter; import com.jme3.input.KeyInput; import com.jme3.input.controls.ActionListener; import com.jme3.input.controls.KeyTrigger; @@ -25,6 +26,9 @@ import com.jme3.terrain.heightmap.Namer; import com.jme3.texture.Texture; import com.jme3.texture.Texture.WrapMode; import java.io.File; +import java.io.IOException; +import java.util.logging.Level; +import java.util.logging.Logger; public class TerrainGridTest extends SimpleApplication { @@ -138,6 +142,12 @@ public class TerrainGridTest extends SimpleApplication { } public void tileAttached(Vector3f cell, TerrainQuad quad) { +// 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")); +// } catch (IOException ex) { +// Logger.getLogger(TerrainFractalGridTest.class.getName()).log(Level.SEVERE, null, ex); +// } quad.addControl(new RigidBodyControl(new HeightfieldCollisionShape(quad.getHeightMap(), terrain.getLocalScale()), 0)); bulletAppState.getPhysicsSpace().add(quad); }