Click or drag to resize
DigitalRuneCompositeShadow Class
Defines a shadow which combines several other Shadows.
Inheritance Hierarchy

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

The CompositeShadow type exposes the following members.

Constructors
  NameDescription
Public methodCompositeShadow
Initializes a new instance of the CompositeShadow class.
Top
Methods
  NameDescription
Public methodClone
Creates a new Shadow that is a clone (deep copy) of the current instance.
(Inherited from Shadow.)
Protected methodCloneCore
Makes the instance a clone (deep copy) of the specified Shadow.
(Overrides ShadowCloneCore(Shadow).)
Protected methodCreateInstanceCore
When implemented in a derived class, creates a new instance of the Shadow derived class.
(Overrides ShadowCreateInstanceCore.)
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 propertyPrefer16Bit
Gets or sets a value indicating whether the shadow map should use a 16-bit format to store depth.
(Inherited from Shadow.)
Public propertyPreferredSize
Gets or sets the size of the desired size of the shadow map in texels.
(Inherited from Shadow.)
Public propertyShadowMap
Gets or sets the shadow map.
(Inherited from Shadow.)
Public propertyShadowMask
Gets or sets the shadow mask.
(Inherited from Shadow.)
Public propertyShadowMaskChannel
Gets or sets the shadow mask channel.
(Inherited from Shadow.)
Public propertyShadows
Gets the list of shadows.
Top
Remarks

A CompositeShadow owns a collection of child shadows (see property Shadows). The CompositeShadow itself does not compute a shadow map (ShadowMap is always ). A shadow map is computed for each child shadow. The shadows of the child shadows will be combined in the ShadowMask of the CompositeShadow. The ShadowMasks of the child shadows will be .

Here ares some applications for composite shadows:

  • Combine two CascadedShadows. One shadow covers a large distance and contains only static objects. The second shadow covers a short distance and contains only dynamic objects.
  • Combine a CascadedShadow with a custom variance shadow map. Use the variance shadow map to create smooth shadows for distant hills. Use the CascadedShadow for detailed shadows of other objects.
See Also