Class DirectionalLight
Represents a directional light. This class cannot be inherited.
public sealed class DirectionalLight
- Inheritance
-
DirectionalLight
- Inherited Members
Constructors
DirectionalLight(EffectParameter, EffectParameter, EffectParameter, DirectionalLight)
Creates a new instance of the DirectionalLight class with or without a copy of a DirectionalLight instance.
public DirectionalLight(EffectParameter directionParameter, EffectParameter diffuseColorParameter, EffectParameter specularColorParameter, DirectionalLight cloneSource)
Parameters
directionParameter
EffectParameterThe light direction.
diffuseColorParameter
EffectParameterThe diffuse color.
specularColorParameter
EffectParameterThe specular color.
cloneSource
DirectionalLightThe cloned source to copy from.
Remarks
The initial parameter values are either copied from the cloned object or set to default values (if the coned object is null). The three Effect Parameters are updated whenever the direction, diffuse color, or specular color properties are changed; or you can set these to null if you are using the cloned object.
Properties
DiffuseColor
Gets or Sets the diffuse color of the light.
public Vector3 DiffuseColor { get; set; }
Property Value
Direction
Gets or Sets the light direction.
public Vector3 Direction { get; set; }
Property Value
Remarks
This value must be a unit vector.
Enabled
Gets or Sets a value indicating whether light is enabled.
public bool Enabled { get; set; }
Property Value
SpecularColor
Gets or Sets the specular color of the light.
public Vector3 SpecularColor { get; set; }