Class ModelRenderProcessor
public class ModelRenderProcessor : EntityProcessor<ModelComponent, RenderModel>, IEntityComponentRenderProcessor
- Inheritance
-
ModelRenderProcessor
- Implements
- Inherited Members
Constructors
ModelRenderProcessor()
public ModelRenderProcessor()
Properties
RenderModels
public Dictionary<ModelComponent, RenderModel> RenderModels { get; }
Property Value
VisibilityGroup
public VisibilityGroup VisibilityGroup { get; set; }
Property Value
Methods
Draw(RenderContext)
Performs work related to this processor.
public override void Draw(RenderContext context)
Parameters
context
RenderContext
GenerateComponentData(Entity, ModelComponent)
Generates associated data to the given entity.
protected override RenderModel GenerateComponentData(Entity entity, ModelComponent component)
Parameters
entity
EntityThe entity.
component
ModelComponent
Returns
- RenderModel
The associated data.
IsAssociatedDataValid(Entity, ModelComponent, RenderModel)
Checks if the current associated data is valid, or if readding the entity is required.
protected override bool IsAssociatedDataValid(Entity entity, ModelComponent component, RenderModel associatedData)
Parameters
entity
EntityThe entity.
component
ModelComponentassociatedData
RenderModelThe associated data.
Returns
- bool
True if the change in associated data requires the entity to be readded, false otherwise.
OnEntityComponentRemoved(Entity, ModelComponent, RenderModel)
Run when a matching entity is removed from this entity processor.
protected override void OnEntityComponentRemoved(Entity entity, ModelComponent component, RenderModel renderModel)
Parameters
entity
EntityThe entity.
component
ModelComponentrenderModel
RenderModel
OnSystemAdd()
Run when this EntityProcessor is added to an EntityManager.
protected override void OnSystemAdd()