Terrain Class |
Namespace: DigitalRune.Graphics
The Terrain type exposes the following members.
Name | Description | |
---|---|---|
Dispose |
Releases all resources used by an instance of the Terrain class.
| |
Dispose(Boolean) |
Releases the unmanaged resources used by an instance of the Terrain class
and optionally releases the managed resources.
| |
Equals | (Inherited from Object.) | |
Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) | |
GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.) | |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
Invalidate |
Invalidates all data cached by the renderer.
| |
Invalidate(Aabb) |
Invalidates the specified region in the data cached by the renderer.
| |
Invalidate(TerrainLayer) |
Invalidates the specified terrain layer in the data cached by the renderer.
| |
Invalidate(TerrainTile) |
Invalidates the specified terrain tile in the data cached by the renderer.
| |
Invalidate(TerrainTile, TerrainLayer) |
Invalidates the specified terrain layer in the data cached by the renderer.
| |
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) | |
ToString | Returns a string that represents the current object. (Inherited from Object.) |
Name | Description | |
---|---|---|
Aabb |
Gets the axis-aligned bounding box of the terrain tile.
(Vertical min and max values are not set!)
| |
BaseClearValues |
Gets or sets the values written into the BaseClipmap textures when
it is cleared.
| |
DetailClearValues |
Gets or sets the values written into the DetailClipmap textures
when it is cleared.
| |
IsDisposed |
Gets a value indicating whether this instance has been disposed of.
| |
Tiles |
Gets the terrain tiles which define the terrain geometry and materials.
|
This type is not available on the following platforms: Xbox 360, mobile platforms
A terrain is split into one or more tiles. The terrain tiles defines the geometry (height, normals, holes) of the terrain. Each tile has a set of material layers (dirt, grass, decals, roads) that define the appearance. The material layers are applied (blended) one after the other, which means that a layer can override previous layers.
See TerrainTile and TerrainLayer for more information.
Cache invalidation:
When the Terrain is used with the TerrainNode, then the terrain
data is cached in clipmaps. Therefore, it is important to notify the terrain system when a
tile or layer has changed and the cached data is invalid. When tiles or layers are added to or
removed from the terrain, this happens automatically. But when the properties or the contents
of tiles/layers are changed, the affected region needs to be invalidated explicitly by calling
the appropriate Invalidate method of the Terrain or the
TerrainTile. For example, when the contents of a height map is changed, the
affected region on the terrain needs to be invalidated by calling
Invalidate(Aabb) or
Invalidate(TerrainTile).