TerrainDecalLayer Class |
Namespace: DigitalRune.Graphics
The TerrainDecalLayer type exposes the following members.
Name | Description | |
---|---|---|
TerrainDecalLayer(IGraphicsService) |
Initializes a new instance of the TerrainDecalLayer class with the default
material.
| |
TerrainDecalLayer(Material) |
Initializes a new instance of the TerrainDecalLayer class with a custom
material.
|
Name | Description | |
---|---|---|
Dispose |
Releases all resources used by an instance of the TerrainLayer class.
(Inherited from TerrainLayer.) | |
Dispose(Boolean) |
Releases the unmanaged resources used by an instance of the TerrainLayer class
and optionally releases the managed resources.
(Inherited from TerrainLayer.) | |
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.) | |
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 (or sets) the axis-aligned bounding box of the area that is influenced by this terrain
layer.
(Inherited from TerrainLayer.) | |
Alpha |
Gets or sets the opacity (alpha). (This is a material parameter - see remarks.)
| |
DiffuseColor |
Gets or sets the diffuse color.(This is a material parameter - see remarks.)
| |
DiffuseTexture |
Gets or sets the diffuse texture. (This is a material parameter - see remarks.)
| |
FadeInEnd |
Gets or sets the clipmap level where the fade-in ends and this terrain layer is fully
visible. (This is a material parameter - see remarks.)
(Inherited from TerrainLayer.) | |
FadeInStart |
Gets or sets the clipmap level where this terrain layer starts to fade in.
(This is a material parameter - see remarks.)
(Inherited from TerrainLayer.) | |
FadeOutEnd |
Gets or sets the clipmap level where the fade-out ends and this terrain layer is not
rendered anymore. (This is a material parameter - see remarks.)
(Inherited from TerrainLayer.) | |
FadeOutStart |
Gets or sets the clipmap level where this terrain layer starts to fade out.
(This is a material parameter - see remarks.)
(Inherited from TerrainLayer.) | |
Height |
Gets or sets the height of the decal in world space.
| |
HeightTexture |
Gets or sets the height texture. (This is a material parameter - see remarks.)
| |
HeightTextureBias |
Gets or sets the bias that is added to samples of the height texture.
(This is a material parameter - see remarks.)
| |
HeightTextureScale |
Gets or sets the scale that is multiplied with samples of the height texture.
(This is a material parameter - see remarks.)
| |
IsDisposed |
Gets a value indicating whether this instance has been disposed of.
(Inherited from TerrainLayer.) | |
Material |
Gets (or sets) the material that is used to render this terrain layer.
(Inherited from TerrainLayer.) | |
MaterialInstance |
Gets the material instance.
(Inherited from TerrainLayer.) | |
NormalTexture |
Gets or sets the normal texture. (This is a material parameter - see remarks.)
| |
Pose |
Gets or sets the pose of the decal.
| |
SpecularColor |
Gets or sets the specular color. (This is a material parameter - see remarks.)
| |
SpecularPower |
Gets or sets the specular color exponent. (This is a material parameter - see remarks.)
| |
SpecularTexture |
Gets or sets the specular texture. (This is a material parameter - see remarks.)
| |
Width |
Gets or sets the width of the decal in world space.
|
The TerrainDecalLayer can be used to render decals, such as dirt, leaves, explosion marks, sewer grates, etc. onto the terrain.
The position and orientation of the texture is determined by the Pose. The decal is projected in "forward" (-z) direction. That means that the orientation will usually be a downward facing orientation and the y value of the position will be ignored. For example:
var position = new Vector3F(positionX, 0, positionZ); var orientation = Matrix33F.CreateRotationY(rotationAngle) * Matrix33F.CreateRotationX(-ConstantsF.PiOver2); myDecalLayer.Pose = new Pose(position, orientation);
The decal is centered at the specified Pose. The extent is defined by Width and Height.
Important: The decal is only rendered on tiles where the decal layer is added. If the decal overlaps multiple terrain tiles, the decal layer needs to be added to all tiles. (An instance of TerrainDecalLayer can be shared by multiple terrain tiles.
Material:
Different TerrainDecalLayers can share the same material.