Stride

OPEN / CLOSE
  • Features
  • Blog
  • Documentation
  • Community
(icon) Download

  • Discord
  • Facebook
  • Twitter
  • YouTube

LANGUAGE

OPEN / CLOSE
  • English
  • 日本語
    Show / Hide Table of Contents

    LightProcessor Class

    Namespace: Stride.Rendering.Lights
    Assembly: Stride.Engine.dll

    Process LightComponent stored in an EntityManager by providing grouped lights per types/shadows.

    System.Object → EntityProcessor → EntityProcessor<LightComponent, RenderLight> → LightProcessor
    Derived from LightProcessor:

    public class LightProcessor : EntityProcessor<LightComponent, RenderLight>, IEntityComponentRenderProcessor
    Name Description
    Constructors
    LightProcessor()

    Initializes a new instance of the LightProcessor class.

    Fields
    DefaultDirection

    The default direction of a light vector is (x,y,z) = (0,0,-1)

    Properties
    Lights

    Gets the active lights.

    VisibilityGroup
    Methods
    Draw(RenderContext)
    GenerateComponentData(Entity, LightComponent)
    GetRenderLight(LightComponent)
    IsAssociatedDataValid(Entity, LightComponent, RenderLight)
    OnSystemAdd()
    OnSystemRemove()
    | Improve this Doc View Source

    Constructors


    LightProcessor()

    Initializes a new instance of the LightProcessor class.

    public LightProcessor()
    | Improve this Doc View Source

    Fields


    DefaultDirection

    The default direction of a light vector is (x,y,z) = (0,0,-1)

    public static readonly Vector3 DefaultDirection
    Field Value
    Type Description
    Vector3
    | Improve this Doc View Source

    Properties


    Lights

    Gets the active lights.

    public RenderLightCollection Lights { get; }
    Property Value
    Type Description
    RenderLightCollection

    The lights.


    VisibilityGroup

    public VisibilityGroup VisibilityGroup { get; set; }
    Property Value
    Type Description
    VisibilityGroup
    | Improve this Doc View Source

    Methods


    Draw(RenderContext)

    public override void Draw(RenderContext context)
    Parameters
    Type Name Description
    RenderContext context
    Overrides
    EntityProcessor.Draw(RenderContext)

    GenerateComponentData(Entity, LightComponent)

    protected override RenderLight GenerateComponentData(Entity entity, LightComponent component)
    Parameters
    Type Name Description
    Entity entity
    LightComponent component
    Returns
    Type Description
    RenderLight
    Overrides
    Stride.Engine.EntityProcessor<Stride.Engine.LightComponent, Stride.Rendering.Lights.RenderLight>.GenerateComponentData(Stride.Engine.Entity, Stride.Engine.LightComponent)

    GetRenderLight(LightComponent)

    public RenderLight GetRenderLight(LightComponent lightComponent)
    Parameters
    Type Name Description
    LightComponent lightComponent
    Returns
    Type Description
    RenderLight

    IsAssociatedDataValid(Entity, LightComponent, RenderLight)

    protected override bool IsAssociatedDataValid(Entity entity, LightComponent component, RenderLight associatedData)
    Parameters
    Type Name Description
    Entity entity
    LightComponent component
    RenderLight associatedData
    Returns
    Type Description
    System.Boolean
    Overrides
    Stride.Engine.EntityProcessor<Stride.Engine.LightComponent, Stride.Rendering.Lights.RenderLight>.IsAssociatedDataValid(Stride.Engine.Entity, Stride.Engine.LightComponent, Stride.Rendering.Lights.RenderLight)

    OnSystemAdd()

    protected override void OnSystemAdd()
    Overrides
    Stride.Engine.EntityProcessor<Stride.Engine.LightComponent, Stride.Rendering.Lights.RenderLight>.OnSystemAdd()

    OnSystemRemove()

    protected override void OnSystemRemove()
    Overrides
    Stride.Engine.EntityProcessor<Stride.Engine.LightComponent, Stride.Rendering.Lights.RenderLight>.OnSystemRemove()

    Inherited Members

    EntityProcessor<LightComponent, RenderLight>.ComponentDatas
    EntityProcessor<LightComponent, RenderLight>.OnSystemAdd()
    EntityProcessor<LightComponent, RenderLight>.OnSystemRemove()
    EntityProcessor<LightComponent, RenderLight>.RemoveAllEntities()
    EntityProcessor<LightComponent, RenderLight>.ProcessEntityComponent(Entity, EntityComponent, Boolean)
    EntityProcessor<LightComponent, RenderLight>.GenerateComponentData(Entity, LightComponent)
    EntityProcessor<LightComponent, RenderLight>.IsAssociatedDataValid(Entity, LightComponent, RenderLight)
    EntityProcessor<LightComponent, RenderLight>.OnEntityComponentAdding(Entity, LightComponent, RenderLight)
    EntityProcessor<LightComponent, RenderLight>.OnEntityComponentRemoved(Entity, LightComponent, RenderLight)
    EntityProcessor.Tags
    EntityProcessor.UpdateProfilingState
    EntityProcessor.DrawProfilingState
    EntityProcessor.Enabled
    EntityProcessor.MainComponentType
    EntityProcessor.RequiredTypes
    EntityProcessor.HasRequiredComponents
    EntityProcessor.Order
    EntityProcessor.EntityManager
    EntityProcessor.Services
    EntityProcessor.Update(GameTime)
    EntityProcessor.RemoveAllEntities()
    EntityProcessor.ProcessEntityComponent(Entity, EntityComponent, Boolean)
    EntityProcessor.InternalAddEntity(Entity)
    EntityProcessor.InternalRemoveEntity(Entity, Boolean)

    Extension Methods

    ComponentBaseExtensions.DisposeBy<T>(T, ICollectorHolder)
    ComponentBaseExtensions.RemoveDisposeBy<T>(T, ICollectorHolder)
    • Improve this Doc
    • View Source
    In This Article

    Back to top

    Copyright © 2019-2021 .NET Foundation and Contributors
    Supported by the .NET Foundation