Table of Contents

Class PhysicsProcessor

Namespace
Stride.Physics
Assembly
Stride.Physics.dll
public class PhysicsProcessor : EntityProcessor<PhysicsComponent, PhysicsProcessor.AssociatedData>
Inheritance
PhysicsProcessor
Inherited Members

Constructors

PhysicsProcessor()

public PhysicsProcessor()

Properties

ParentScene

Gets or sets the associated parent scene to render the physics debug shapes. Assigned with default one on OnSystemAdd()

public Scene ParentScene { get; set; }

Property Value

Scene

The parent scene.

Simulation

public Simulation Simulation { get; }

Property Value

Simulation

Methods

Draw(RenderContext)

Performs work related to this processor.

public override void Draw(RenderContext context)

Parameters

context RenderContext

GenerateComponentData(Entity, PhysicsComponent)

Generates associated data to the given entity.

protected override PhysicsProcessor.AssociatedData GenerateComponentData(Entity entity, PhysicsComponent component)

Parameters

entity Entity

The entity.

component PhysicsComponent

Returns

PhysicsProcessor.AssociatedData

The associated data.

IsAssociatedDataValid(Entity, PhysicsComponent, AssociatedData)

Checks if the current associated data is valid, or if readding the entity is required.

protected override bool IsAssociatedDataValid(Entity entity, PhysicsComponent physicsComponent, PhysicsProcessor.AssociatedData associatedData)

Parameters

entity Entity

The entity.

physicsComponent PhysicsComponent
associatedData PhysicsProcessor.AssociatedData

The associated data.

Returns

bool

True if the change in associated data requires the entity to be readded, false otherwise.

OnEntityComponentAdding(Entity, PhysicsComponent, AssociatedData)

Run when a matching entity is added to this entity processor.

protected override void OnEntityComponentAdding(Entity entity, PhysicsComponent component, PhysicsProcessor.AssociatedData data)

Parameters

entity Entity

The entity.

component PhysicsComponent
data PhysicsProcessor.AssociatedData

The associated data.

OnEntityComponentRemoved(Entity, PhysicsComponent, AssociatedData)

Run when a matching entity is removed from this entity processor.

protected override void OnEntityComponentRemoved(Entity entity, PhysicsComponent component, PhysicsProcessor.AssociatedData data)

Parameters

entity Entity

The entity.

component PhysicsComponent
data PhysicsProcessor.AssociatedData

The associated data.

OnSystemAdd()

Run when this EntityProcessor is added to an EntityManager.

protected override void OnSystemAdd()

OnSystemRemove()

Run when this EntityProcessor is removed from an EntityManager.

protected override void OnSystemRemove()

UpdateRemovals()

public void UpdateRemovals()