|
|
|
@ -26,13 +26,22 @@ public class Terrain {
@@ -26,13 +26,22 @@ public class Terrain {
|
|
|
|
|
public Vector2f cell_size = new Vector2f(); |
|
|
|
|
public Vector2f cell_count = new Vector2f(); |
|
|
|
|
public float terrain_scale; |
|
|
|
|
public int template; |
|
|
|
|
public int heightmap; |
|
|
|
|
|
|
|
|
|
public Terrain(Zone zone) { |
|
|
|
|
|
|
|
|
|
this.heightmap = zone.terrain_image; |
|
|
|
|
|
|
|
|
|
// Configure PLANAR
|
|
|
|
|
|
|
|
|
|
if (zone.terrain_type.equals("PLANAR")) |
|
|
|
|
this.heightmap = 1006300; |
|
|
|
|
|
|
|
|
|
this.terrain_size.x = zone.major_radius; |
|
|
|
|
this.terrain_size.y = zone.minor_radius; |
|
|
|
|
|
|
|
|
|
this.terrain_pixel_data = _heightmap_pixel_cache.get(zone.terrain_image); |
|
|
|
|
this.terrain_pixel_data = _heightmap_pixel_cache.get(heightmap); |
|
|
|
|
|
|
|
|
|
this.cell_count.x = this.terrain_pixel_data.length - 1; |
|
|
|
|
this.cell_count.y = this.terrain_pixel_data[0].length - 1; |
|
|
|
|