CloudMapLayer Class |
Namespace: DigitalRune.Graphics
The CloudMapLayer type exposes the following members.
Name | Description | |
---|---|---|
CloudMapLayer |
Initializes a new instance of the CloudMapLayer class with default settings.
| |
CloudMapLayer(Texture2D, Matrix33F, Single, Single, Single) |
Initializes a new instance of the CloudMapLayer struct.
|
Name | Description | |
---|---|---|
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 | |
---|---|---|
AnimationSpeed |
Gets or sets the animation speed. (Only used if Texture is
- see remarks.)
| |
DensityOffset |
Gets or sets the density offset that is added to the density of this
CloudMapLayer.
| |
DensityScale |
Gets or sets the density scale factor that is used to scale the density of this
CloudMapLayer.
| |
Texture |
Gets or sets the cloud texture that defines the cloud density. (Optional)
| |
TextureMatrix |
Gets or sets the matrix used to transform the texture coordinates.
|
A CloudMap consists of several cloud map layers. A cloud map layer defines the relative cloud density: A value of 0 means the sky is clear (no clouds), a positive value increases the density (more clouds), and a negative value decreases the density (less clouds). Cloud map layers are added together to get the overall cloud density. The density contribution of each layer is (pseudo code):
CloudDensity += DensityScale * (Texture[TextureMatrix * texCoords] + DensityOffset)
The Texture is optional. If Texture is , a random noise texture is used. The random noise texture can be animated (see AnimationSpeed). The property AnimationSpeed is only used to animate the random noise texture. It is not used if a Texture is set.
The TextureMatrix can be used to scale or translate the texture. By changing the translation part of the TextureMatrix, the layer can be animated to move with the wind.
To disable a CloudMapLayer set the DensityScale to 0.