Click or drag to resize
DigitalRunePointLight Class
Represents a point light.
Inheritance Hierarchy

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

The PointLight type exposes the following members.

Constructors
  NameDescription
Public methodPointLight
Initializes a new instance of the PointLight class.
Top
Methods
  NameDescription
Public methodClone
Creates a new Light that is a clone (deep copy) of the current instance.
(Inherited from Light.)
Protected methodCloneCore
Makes the instance a clone (deep copy) of the specified Light.
(Overrides LightCloneCore(Light).)
Protected methodCreateInstanceCore
When implemented in a derived class, creates a new instance of the Light derived class.
(Overrides LightCreateInstanceCore.)
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 methodGetIntensity
Gets the (approximated) light intensity at the given distance.
(Overrides LightGetIntensity(Single).)
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 propertyAttenuation
Gets or sets the exponent for the distance attenuation.
Public propertyColor
Gets or sets the RGB color of the light.
Public propertyDiffuseIntensity
Gets or sets the diffuse intensity of the light.
Public propertyHdrScale
Gets or sets the HDR scale of the light.
Public propertyName
Gets or sets the name of the light.
(Inherited from Light.)
Public propertyRange
Gets or sets the range of the light.
Public propertyShape
Gets (or sets) the shape of the light volume.
(Inherited from Light.)
Public propertySpecularIntensity
Gets or sets the specular intensity of the light.
Public propertyTexture
Gets or sets the cube map texture which is projected by this point light.
Top
Remarks

Point lights have color, intensity, position and range - but no direction. Point lights give off light equally in all directions. The PointLight object defines the light properties of a point light that is positioned at the origin (0, 0, 0). A LightNode needs to be created to position a light within a 3D scene.

Color, DiffuseIntensity/SpecularIntensity, HdrScale, and a light distance attenuation factor 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 pure diffuse light can be created by setting DiffuseIntensity > 0 and SpecularIntensity = 0. A pure specular light can be created by setting DiffuseIntensity = 0 and SpecularIntensity > 0.

The Shape of a point light is a SphereShape with a radius equal to Range.

A cube map texture (see Texture) can be assigned to the point light. By default no texture is assigned. If a texture is set, the point light projects this texture on its surroundings (like a disco ball).

Cloning: When the PointLight is cloned the Texture is not duplicated. The Texture is copied by reference.

See Also