JVM Languages
terrain.txt
Associated article: Heightmap Terrain Rendering
Tags: Mobile JVM Languages
Published source code accompanying the article by Mikael Baros in which he uses heightmaps and Java's Mobile 3D Graphics API to create realistic 3D graphics for mobiles devices. Also see TERRAIN.ZIP.
Heightmap Terrain Rendering
by Mikael Baros
Listing One
public static Mesh createQuad(short[] heights, int cullFlags)
{
// The vertrices of the quad
short[] vertrices = {-255, heights[0], -255,
255, heights[1], -255,
255, heights[2], 255,
-255, heights[3], 255};
Listing Two
// Create the model's vertex colors
VertexArray colorArray = ...


