Click or drag to resize
DigitalRuneAmbientLightShape Property
Gets or sets the shape of the light volume.

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

Property Value

Type: Shape
A Shape that describes the light volume (the area that is hit by the light).
Exceptions
ExceptionCondition
ArgumentNullExceptionvalue is .
Remarks

The Shape defines the space that is lit by the light source. The shape depends on the type of light (see derived classes). For example, the light volume of a PointLight is a SphereShape where the radius of the sphere matches the range of the light. The light volume is used by the Scene to determine which objects are lit by a certain light source.

This shape is used for culling using bounding shapes. It is not used to clip the lit area: If the bounding shape of a mesh touches this shape, then the whole mesh is lit - not only the overlapping part! The Clip property of a LightNode can be used to define a clipping volume.

Some light classes may allow to change the shape. But the shape should not be replaced while the Light is in use, i.e. referenced by a LightNode. For example, if the bounding shape is a SphereShape, the radius of the sphere can be changed at any time. But it is not allowed to replace the SphereShape with a BoxShape as long as the light is used in a scene. Replacing the bounding shape will not raise any exceptions, but the light node may not use the new shape, hence it may not be rendered as desired.

See Also