Would anyone be horribly offended if I committed this? Its a very simple height map implementation that just builds an array of 0’s so that flat terrain can be quickly achieved… Good for debugging, I figure this would be useful for people working on their own tile loaders or just want flat, endless terrain
[java]
import com.jme3.terrain.heightmap.AbstractHeightMap;
/**
- Creates a flat heightmap of a desired size.
-
@author Skye Book
*
*/
public class EmptyHeightMap extends AbstractHeightMap {
private int size;
/**
*
/
public EmptyHeightMap(int size) {
this.size = size;
}
/ (non-Javadoc)
-
@see com.jme3.terrain.heightmap.HeightMap#load()
/
@Override
public boolean load() {
heightData = new float[sizesize];
for(int i=0; i<(size*size); i++){
heightData=0f;
}
return true;
}
}
[/java]
https://github.com/skyebook/TMS3D/blob/master/src/net/skyebook/tms3d/EmptyHeightMap.java