These pages are auto-generated from self-documenting comments embedded in class files.

For more information on breve and steve, refer to the breve homepage.

Real : Terrain

Class Description:

Terrain is an experimental class to add terrains to simulations.

Class methods:


generate with-ruggedness ruggedness (float) with-height terrainHeight (float)

Generates a fractal landscape with a ruggedness (between 0.0 and 1.0), and maximum height terrainHeight.


get-height at-x xCoordinate (int) at-y yCoordinate (int)

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.


get-location

Returns the location of this Terrain object.


move to newLocation (vector)

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.


set-color to color (vector)

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.


set-height at-x xCoordinate (int) at-y yCoordinate (int) to height (double)

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.


set-peak-color to color (vector)

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.


set-scale to value (double)

Changes the size of a single tile in the terrain.


set-valley-color to color (vector)

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.


Documentation created Tue May 11 10:28:37 2004