A light that is considered infinitely away from the viewer, thus it only
has a direction (e.g. the Sun relative to the Earth seems "infinitely" away). Also
known as a parallel light. This will ignore the attenuation properties of the Light base class.
Declaration Syntax
C# |
public class DirectionalLight : Light
Members
All Members | Constructors | Methods | Properties | ||
|
|
|
Icon | Member | Description |
---|---|---|
DirectionalLight()()()() |
Creates a new DirectionalLight with direction
pointing down the negative Z-axis.
|
|
DirectionalLight(Vector3) |
Creates a new DirectionalLight.
|
|
Ambient |
Gets or sets the ambient contribution of this light,
which is the color that appears to be coming from everywhere.
Default: Color(.4f, .4f, .4f, 1.0f);
(Inherited from Light.) |
|
Attenuate |
Gets or sets if this light should attenuate. Note,
some lights may ignore this (e.g. Directional lights
should never attenuate)
Default: True
(Inherited from Light.) |
|
Constant |
Gets or sets the attenuation constant, which is part
of this formula:
1 / (C + L*d + Q*d*d)
Where C,L, and Q are the attenuation values
and d is the distance from the light source to
the part of the object being lit.
Default: 1.0f
(Inherited from Light.) |
|
Diffuse |
Gets or sets the diffuse contribution of this light,
which is the color directly from the light source.
Default: Color(1.0f, 1.0f, 1.0f, 1.0f)
(Inherited from Light.) |
|
Direction |
Gets or sets the direction of this light. The value
is always normalized.
Default: (0, 0, -1)
|
|
Equals(Object) |
(Inherited from Object.) |
|
Finalize()()()() |
Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.) |
|
GetHashCode()()()() |
Serves as a hash function for a particular type. (Inherited from Object.) |
|
GetType()()()() |
Gets the Type of the current instance. (Inherited from Object.) |
|
IsEnabled |
Gets or sets if this light should be enabled or not.
Default: True
(Inherited from Light.) |
|
LightType |
Gets the type of light, LightType.Directional.
(Overrides Light.LightType.) |
|
Linear |
Gets or sets the attenuation linear value, which is
part of this formula:
1 / (C + L*d + Q*d*d)
Where C,L, and Q are the attenuation values
and d is the distance from the light source to
the part of the object being lit.
Default: 0.0f
(Inherited from Light.) |
|
MemberwiseClone()()()() |
Creates a shallow copy of the current Object. (Inherited from Object.) |
|
Name |
Gets or sets the name of this light.
(Inherited from Light.) |
|
Quadratic |
Gets or sets the attenuation quadratic value,
which is part of this formula:
1 / (C + L*d + Q*d*d)
Where C,L, and Q are the attenuation values
and d is the distance from the light source to
the part of the object being lit.
Default: 0.0f
(Inherited from Light.) |
|
Read(ISavableReader) |
Deserializes this DirectionalLight.
(Overrides Light.Read(ISavableReader).) |
|
SetDirection(Single, Single, Single) |
Convienance method for setting the direction of this
directional light. The direction is automatically
normalized.
|
|
Specular |
Gets or sets the specular contribution of this light,
which is the color reflected by an object depending on
how shiny it is.
Default: Color(1.0f, 1.0f, 1.0f, 1.0f)
(Inherited from Light.) |
|
ToString()()()() |
(Inherited from Object.) |
|
Write(ISavableWriter) |
Serializes this DirectionalLight.
(Overrides Light.Write(ISavableWriter).) |
Assembly: Tesla (Module: Tesla) Version: 0.5.0.0 (0.5.0.0)