Click or drag to resize
DigitalRuneCloudMapLayer Class
Defines a layer of a CloudMap.
Inheritance Hierarchy
SystemObject
  DigitalRune.GraphicsCloudMapLayer

Namespace: DigitalRune.Graphics
Assembly: DigitalRune.Graphics (in DigitalRune.Graphics.dll) Version: 1.2.0.0 (1.2.1.14562)
Syntax
public class CloudMapLayer

The CloudMapLayer type exposes the following members.

Constructors
  NameDescription
Public methodCloudMapLayer
Initializes a new instance of the CloudMapLayer class with default settings.
Public methodCloudMapLayer(Texture2D, Matrix33F, Single, Single, Single)
Initializes a new instance of the CloudMapLayer struct.
Top
Methods
  NameDescription
Public methodEquals
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public methodGetHashCode
Serves as a hash function for a particular type.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Top
Properties
  NameDescription
Public propertyAnimationSpeed
Gets or sets the animation speed. (Only used if Texture is - see remarks.)
Public propertyDensityOffset
Gets or sets the density offset that is added to the density of this CloudMapLayer.
Public propertyDensityScale
Gets or sets the density scale factor that is used to scale the density of this CloudMapLayer.
Public propertyTexture
Gets or sets the cloud texture that defines the cloud density. (Optional)
Public propertyTextureMatrix
Gets or sets the matrix used to transform the texture coordinates.
Top
Remarks

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.

See Also