Click or drag to resize
DigitalRuneWaterNodeVolume Property
Gets or sets the shape which defines the water volume.

Namespace: DigitalRune.Graphics.SceneGraph
Assembly: DigitalRune.Graphics (in DigitalRune.Graphics.dll) Version: 1.2.0.0 (1.2.1.14562)
Syntax
public Shape Volume { get; set; }

Property Value

Type: Shape
The shape which defines the water volume. Can be to create an infinite ocean plane. The default value is .
Remarks

If this value is (default), then an infinite plane of water is rendered. The water plane is horizontal in world space and goes through the local origin of the WaterNode.

If the Volume is set to a shape, then the water is only rendered in the shape. The shape defines the water surface as well as the underwater volume. Examples:

  • A RectangleShape can be used to define a swimming pool without an underwater effect.
  • A BoxShape can be used to define a swimming pool with an underwater effect- which means, a special effect is rendered when the player is diving in the swimming pool.
  • A TriangleMeshShape can be used to define a complex meandering river.

The top surface of the water volume should go through the local origin of the WaterNode. This is expected for depth-based water color computations.

If the water should be rendered with displacement mapping (see Waves), then the Volume must be a shape with a tessellated surface because the displacement is applied to vertices. This means, that waves will not work with a simple RectangleShape. You have to specify a TriangleMeshShape with a sufficient level of tessellation on the top side of the shape. If the Volume is , the renderer will automatically use a tessellated mesh (e.g. a projected grid) if required.

See Also