Search Results for

    Show / Hide Table of Contents

    Class DirectionalLight

    This class represents all properties of sunlight.

    Inheritance
    object
    IdentifiableObject
    DependencyObject
    AttachableObject
    PrefabInstanceObject
    Component
    Light
    DirectionalLight
    PhotometricDirectionalLight
    Implements
    IDependencyObject
    Inherited Members
    Light.ShadowMapManager
    Light.boundingFrustum
    Light.view
    Light.projection
    Light.renderProjection
    Light.viewProjection
    Light.renderViewProjection
    Light.Transform
    Light.color
    Light.shadowBias
    Light.shadowOpacity
    Light.OnIntensityChanged
    Light.OnColorChanged
    Light.OnShadowEnabledChanged
    Light.BoundingFrustum
    Light.Projection
    Light.RenderProjection
    Light.View
    Light.ViewProjection
    Light.RenderViewProjection
    Light.ShadowOpacity
    Light.Color
    Light.LinearColor
    Light.Intensity
    Light.LightDrawContext
    Light.OnAttached()
    Light.OnDetach()
    Light.FireOnShadowEnabledChanged()
    Component.Owner
    Component.Managers
    Component.ShouldBeActivated
    Component.Clone()
    Component.Attach(Entity)
    Component.OnLoaded()
    Component.OnActivated()
    Component.Start()
    Component.OnDeactivated()
    Component.OnDestroy()
    PrefabInstanceObject.PrefabSource
    PrefabInstanceObject.RefreshPrefab(Prefab)
    PrefabInstanceObject.PrefabElementId
    PrefabInstanceObject.IsPrefabInstance
    PrefabInstanceObject.IsMissingPrefabSource
    AttachableObject.AttachableStateChanged
    AttachableObject.IsEnabled
    AttachableObject.State
    AttachableObject.IsLoaded
    AttachableObject.IsAttached
    AttachableObject.IsActivated
    AttachableObject.IsStarted
    AttachableObject.IsDestroyed
    AttachableObject.Destroy()
    AttachableObject.DependencyBroken()
    DependencyObject.Dependencies
    DependencyObject.OnDependencyRemoved
    IdentifiableObject.Id
    IdentifiableObject.IdHasChanged(Guid)
    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

    Manually defined cascade split partition values.

    Declaration
    public float[] SplitDistance
    Field Value
    Type Description
    float[]

    Properties

    CascadeCount

    Gets the number of cascades associated with this light.

    Declaration
    public override int CascadeCount { get; }
    Property Value
    Type Description
    int
    Overrides
    Light.CascadeCount

    DebugMode

    Gets or sets a value indicating whether to show 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 partitioning 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 enabled.

    Declaration
    [RenderProperty(Tag = 3, CustomPropertyName = "Shadow enabled")]
    public override bool IsShadowEnabled { get; set; }
    Property Value
    Type Description
    bool
    Overrides
    Light.IsShadowEnabled

    LightType

    Gets the type of light.

    Declaration
    public override LightType LightType { get; }
    Property Value
    Type Description
    LightType
    Overrides
    Light.LightType

    ShadowBias

    Gets or sets the shadow's depth bias.

    Declaration
    [RenderProperty(AttachToTag = 3, AttachToValue = true)]
    public override float ShadowBias { get; set; }
    Property Value
    Type Description
    float
    Overrides
    Light.ShadowBias

    ShadowDistance

    Gets or sets the maximum 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)

    Computes the bounding box of the light.

    Declaration
    public override void ComputeBoundingBox(out BoundingBox boundingBox)
    Parameters
    Type Name Description
    BoundingBox boundingBox

    The bounding box.

    Overrides
    Light.ComputeBoundingBox(out BoundingBox)

    Intersects(ref BoundingBox)

    Checks if the current light intersects 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 the frustum view.

    Overrides
    Light.Intersects(ref BoundingBox)

    Intersects(ref BoundingFrustum)

    Checks 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 the frustum view.

    Overrides
    Light.Intersects(ref BoundingFrustum)

    Implements

    IDependencyObject

    Extension Methods

    ReflectionHelper.GetMemberAssembly(object)
    ReflectionHelper.GetTypeName(object)
    In this article
    Back to top
    Generated by DocFX