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.

Methods:

  • drawSolid
  • drawWireframe
  • generate
  • generateFractalTerrain
  • getHeight
  • getHeightInWorld
  • loadGeoTiff
  • setHeight
  • setPeakColor
  • setScale
  • setValleyColor
    drawSolid( self )

    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.


    drawWireframe( self )

    Draws the terrain as a wireframe outline only. See also draw-solid.


    generate( self, ruggedness, terrainHeight )


    generateFractalTerrain( self, ruggedness, terrainHeight )

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


    getHeight( self, xCoordinate, yCoordinate )

    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.


    getHeightInWorld( self, xCoordinate, zCoordinate )

    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


    loadGeoTiff( self, geoTIFFFile )


    setHeight( self, xCoordinate, yCoordinate, height )

    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.


    setPeakColor( self, color )

    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.


    setScale( self, value )

    Changes the size of a single tile in the terrain. This does not change the number of elevation points in the terrain.


    setValleyColor( self, color )

    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.