Class DirectionalLight
This class represent all properties for a sun light.
Inheritance
Implements
Inherited Members
Namespace: Evergine.Framework.Graphics
Assembly: Evergine.Framework.dll
Syntax
public class DirectionalLight : Light, IDependencyObject
Constructors
DirectionalLight()
Initializes a new instance of the DirectionalLight class.
Declaration
public DirectionalLight()
Fields
SplitDistance
Manual cascade split partition values.
Declaration
public float[] SplitDistance
Field Value
Type | Description |
---|---|
float[] |
Properties
CascadeCount
Gets the number of cascades associated to this light.
Declaration
public override int CascadeCount { get; }
Property Value
Type | Description |
---|---|
int |
Overrides
DebugMode
Gets or sets a value indicating whether show or not the cascade for directional lights.
Declaration
[RenderProperty(AttachToTag = 3, AttachToValue = true, CustomPropertyName = "Debug Mode")]
public bool DebugMode { get; set; }
Property Value
Type | Description |
---|---|
bool |
Direction
Gets the direction.
Declaration
public Vector3 Direction { get; }
Property Value
Type | Description |
---|---|
Vector3 | The direction. |
GammaDistribution
Gets or sets the gamma distribution value used for logarithmic partition mode.
Declaration
[RenderProperty(AttachToTag = 3, AttachToValue = true)]
public float GammaDistribution { get; set; }
Property Value
Type | Description |
---|---|
float |
IsShadowEnabled
Gets or sets a value indicating whether shadows are enable.
Declaration
[RenderProperty(Tag = 3, CustomPropertyName = "Shadow enabled")]
public override bool IsShadowEnabled { get; set; }
Property Value
Type | Description |
---|---|
bool |
Overrides
LightType
Gets the light type.
Declaration
public override LightType LightType { get; }
Property Value
Type | Description |
---|---|
LightType |
Overrides
ShadowBias
Gets or sets the shadows depthBias.
Declaration
[RenderProperty(AttachToTag = 3, AttachToValue = true)]
public override float ShadowBias { get; set; }
Property Value
Type | Description |
---|---|
float |
Overrides
ShadowDistance
Gets or sets the maximun distance from the camera at which shadows are rendered.
Declaration
[RenderProperty(AttachToTag = 3, AttachToValue = true)]
public float ShadowDistance { get; set; }
Property Value
Type | Description |
---|---|
float |
Methods
ComputeBoundingBox(out BoundingBox)
Compute the bounding box of the light.
Declaration
public override void ComputeBoundingBox(out BoundingBox boundingBox)
Parameters
Type | Name | Description |
---|---|---|
BoundingBox | boundingBox | The bounding box. |
Overrides
Intersects(ref BoundingBox)
Check if the current light intersect with the specified bbox.
Declaration
public override bool Intersects(ref BoundingBox frustum)
Parameters
Type | Name | Description |
---|---|---|
BoundingBox | frustum |
Returns
Type | Description |
---|---|
bool | Whether the light is inside frustum view. |
Overrides
Intersects(ref BoundingFrustum)
Check if the current light is inside the specified frustum.
Declaration
public override bool Intersects(ref BoundingFrustum frustum)
Parameters
Type | Name | Description |
---|---|---|
BoundingFrustum | frustum | The frustum. |
Returns
Type | Description |
---|---|
bool | Whether the light is inside frustum view. |