LightShape Property |
Namespace: DigitalRune.Graphics
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.