LightProcessor Class
Namespace: Stride.Rendering.LightsAssembly: Stride.Engine.dll
Process LightComponent stored in an EntityManager by providing grouped lights per types/shadows.
                 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() | ||
Constructors
LightProcessor()
Initializes a new instance of the LightProcessor class.
public LightProcessor()Fields
DefaultDirection
The default direction of a light vector is (x,y,z) = (0,0,-1)
public static readonly Vector3 DefaultDirectionField Value
| Type | Description | 
|---|---|
| Vector3 | 
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 | 
Methods
Draw(RenderContext)
public override void Draw(RenderContext context)Parameters
| Type | Name | Description | 
|---|---|---|
| RenderContext | context | 
Overrides
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()