Click or drag to resize
DigitalRuneWater Class
Defines the visual properties of a body of water, e.g. a river, a lake or an ocean.
Inheritance Hierarchy
SystemObject
  DigitalRune.GraphicsWater

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

The Water type exposes the following members.

Constructors
  NameDescription
Public methodWater
Initializes a new instance of the Water class.
Top
Methods
  NameDescription
Public methodClone
Creates a new Water that is a clone (deep copy) of the current instance.
Protected methodCloneCore
Makes the instance a clone (deep copy) of the specified Water.
Protected methodCreateInstanceCore
When implemented in a derived class, creates a new instance of the Water derived class.
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 propertyCausticsDistortion
Gets or sets the caustics distortion.
Public propertyCausticsIntensity
Gets or sets the maximal brightness of caustics.
Public propertyCausticsPower
Gets or sets the sharpness of caustics
Public propertyCausticsSampleCount
Gets or sets the number of samples used to compute caustics.
Public propertyCausticsSampleOffset
Gets or sets the caustics sample offset.
Public propertyFoamColor
Gets or sets the color of the foam.
Public propertyFoamCrestMax
Gets or sets the wave crest height where foam is fully visible.
Public propertyFoamCrestMin
Gets or sets the wave crest height where foam starts.
Public propertyFoamDistortion
Gets or sets a factor indicating how much foam is distorted by waves.
Public propertyFoamMap
Gets or sets the foam map.
Public propertyFoamMapScale
Gets or sets the scale of foam map.
Public propertyFoamShoreIntersection
Gets or sets the amount of foam where the water intersects geometry (e.g. the shore).
Public propertyFresnelBias
Gets or sets the bias for the Fresnel effect approximation.
Public propertyFresnelPower
Gets or sets the exponent for the Fresnel effect.
Public propertyFresnelScale
Gets or sets the scale for the Fresnel effect approximation.
Public propertyIntersectionSoftness
Gets or sets the intersection softness.
Public propertyNormalMap0
Gets or sets the first normal map.
Public propertyNormalMap0Scale
Gets or sets the scale of the first normal map.
Public propertyNormalMap0Strength
Gets or sets the strength of the first normal map.
Public propertyNormalMap0Velocity
Gets or sets the scroll velocity of the first normal map.
Public propertyNormalMap1
Gets or sets the second normal map.
Public propertyNormalMap1Scale
Gets or sets the scale of the second normal map.
Public propertyNormalMap1Strength
Gets or sets the strength of the second normal map.
Public propertyNormalMap1Velocity
Gets or sets the scroll velocity of the second normal map.
Public propertyReflectionColor
Gets or sets the tint color of the reflection.
Public propertyReflectionDistortion
Gets or sets the intensity of distortion effects for any reflections.
Public propertyRefractionColor
Gets or sets the tint color of the refraction.
Public propertyRefractionDistortion
Gets or sets the intensity of distortion effects for any refractions.
Public propertyScatterColor
Gets or sets the color/intensity of subsurface scattering effect.
Public propertySpecularColor
Gets or sets the tint color of the specular highlight.
Public propertySpecularPower
Gets or sets the specular exponent which defines the size of the specular highlight.
Public propertyUnderwaterFogDensity
Gets or sets the underwater fog density, which defines how far you can see underwater.
Public propertyWaterColor
Gets or sets the color of the water.
Top
Remarks

This class defines the appearance of a body of water. Two normal maps (NormalMap0 and NormalMap1) define the wave ripple structure on the water surface. The normal maps are scrolled over the water surface to create the sense of an animated water surface.

The water surface is rendered using a specular highlight, a reflection and the refracted scene under the water surface. Underwater is lit using light extinction and scattering, similar to exponential fog. UnderwaterFogDensity defines the extinction properties which create the water color.

Cloning: When the Water is cloned the normal map textures are not duplicated. The textures are copied by reference.

See Also