Represents a light that projects a texture.

Namespace: DigitalRune.Graphics
Assembly: DigitalRune.Graphics (in DigitalRune.Graphics.dll) Version: 1.0.0.0 (1.0.0.9509)

Syntax

C#
public class ProjectorLight : Light
Visual Basic
Public Class ProjectorLight _
	Inherits Light
Visual C++
public ref class ProjectorLight : public Light

Remarks

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

  • Diffuse light intensity Ldiffuse = ColorRGB · DiffuseIntensity
  • Specular light intensity Lspecular = ColorRGB · SpecularIntensity

When using a high dynamic range lighting (HDR lighting) the light intensities are

  • Diffuse light intensity Ldiffuse = ColorRGB · DiffuseIntensity · HdrScale
  • Specular light intensity Lspecular = ColorRGB · SpecularIntensity · HdrScale

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.

Inheritance Hierarchy

System..::..Object
  DigitalRune.Graphics..::..Light
    DigitalRune.Graphics..::..ProjectorLight

See Also