Terrain is an experimental class to add terrains to simulations.
Draws the terrain as solid polygons. This is the default mode. Alternatively, the terrain can be drawn as wireframe only using the method draw-wireframe.
Draws the terrain as a wireframe outline only. See also draw-solid.
Generates a fractal landscape with a ruggedness (between 0.0 and 1.0), and maximum height terrainHeight.
Returns the height of the terrain at (xCoordinate, yCoordinate). The coordinates refer to the polygons on the terrain, not to the real world location of points on the terrain.
This method returns the height of the terrain at the real world (xCoordinate, zCoodinate) location. This is in contrast to the height in terrain grid coordinates given give with get-height
Returns the location of this Terrain object.
Sets the location of the terrain to location. This method can be used to set the location of the terrain when setting up the world, but should not generally be used to dynamically over the course of the simulation.
Sets the color of this terrain object. The peak and valley colors can also be set independently using set-peak-color and set-valley-color.
Sets the height of the terrain at (xCoordinate, yCoordinate) to height. The coordinates refer to the polygons on the terrain, not to the real world location of points on the terrain.
Sets the color of the highest regions of the terrain to color. As the height of the terrain decreases, There will be a gradient towards the color specified with set-valley-color.
Changes the size of a single tile in the terrain. This does not change the number of elevation points in the terrain.
Sets the color of the lowest regions of the terrain to color. As the height of the terrain increases, There will be a gradient towards the color specified with set-peak-color.