ProjectorLight Class |
Namespace: DigitalRune.Graphics
The ProjectorLight type exposes the following members.
Name | Description | |
---|---|---|
ProjectorLight |
Initializes a new instance of the ProjectorLight class.
| |
ProjectorLight(Texture2D, Projection) |
Initializes a new instance of the ProjectorLight class.
|
Name | Description | |
---|---|---|
Clone |
Creates a new Light that is a clone (deep copy) of the current instance.
(Inherited from Light.) | |
CloneCore |
Makes the instance a clone (deep copy) of the specified Light.
(Overrides LightCloneCore(Light).) | |
CreateInstanceCore |
When implemented in a derived class, creates a new instance of the
Light derived class.
(Overrides LightCreateInstanceCore.) | |
Equals | (Inherited from Object.) | |
Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) | |
GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.) | |
GetIntensity |
Gets the (approximated) light intensity at the given distance.
(Overrides LightGetIntensity(Single).) | |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) | |
ToString | Returns a string that represents the current object. (Inherited from Object.) |
Name | Description | |
---|---|---|
Attenuation |
Gets or sets the attenuation exponent for the distance attenuation.
| |
Color |
Gets or sets the RGB color of the light.
| |
DiffuseIntensity |
Gets or sets the diffuse intensity of the light.
| |
HdrScale |
Gets or sets the HDR scale of the light.
| |
Name |
Gets or sets the name of the light.
(Inherited from Light.) | |
Projection |
Gets or sets the projection.
| |
Shape |
Gets (or sets) the shape of the light volume.
(Inherited from Light.) | |
SpecularIntensity |
Gets or sets the specular intensity of the light.
| |
Texture |
Gets or sets the texture.
|
A projector light is similar to a Spotlight, but is usually used to project a texture. The light emitted is shaped like a view frustum and not like a cone. And the light does not have the typical "spotlight falloff".
A Projection defines the shape of the light. Usually, a PerspectiveProjection is used, but it is also possible to use a OrthographicProjection.
Projector lights have color, intensity, position, direction and range. The ProjectorLight object defines the light properties of a projector light positioned at the origin (0, 0, 0) that shines in forward direction (0, 0, -1) - see Forward. A LightNode needs to be created to position and orient a projector light within a 3D scene.
Color, DiffuseIntensity/SpecularIntensity, HdrScale, and the light distance attenuation factor (see GetDistanceAttenuation(Single, Single, Single)) are multiplied to get the final diffuse and specular light intensities which can be used in the lighting equations.
When using a low dynamic range lighting (LDR lighting) the light intensities are
When using a high dynamic range lighting (HDR lighting) the light intensities are
A 2D texture (see Texture) must be assigned to the projector light. If a texture is set, the light intensity is modulated with the texture to project the texture onto the lit surroundings. By default no texture is assigned. If no texture is set, the projector light does not emit any light.
Cloning: When the ProjectorLight is cloned the Texture is not duplicated. The Texture is copied by reference.