You could still use RawHeightMap with the array constructor to pack your data.
I implemented Savable, equals and hashcode in RawArrayHeightmap. I use those in my project.
RawHeightMap doesn't implement those.
But don't worry, I recovered my code and just copied it inside my project :)
heightmapGrid is internal to TerrainGrid
I just implement the Interface to give food to the grid. (I use a TerrainGrid of course).
It’s me again. I have an Exception in AbstractHeightMap :
[java]public float getInterpolatedHeight(float x, float z) {
[…]
if (x + 1 > size) {
[…]
if (z + 1 > size) {
[/java]
Fixed it with >= size instead of > size
The crash occurs if you request the exact limit of your heightmap. In my project, the size is 257. if I ask the interpolatedHeight of 257… actually 256 if you count the zero, it crashes because 256 + 1 > size is false.
You are correct. Fixed in svn
Thanks for the bug hunting help