C# Class BEPUphysics.UpdateableSystems.ForceFields.ForceField

Superclass of objects which apply forces to entities in some field.
Inheritance: Updateable, IDuringForcesUpdateable
Mostra file Open project: Indiefreaks/igf

Public Methods

Method Description
OnAdditionToSpace ( ISpace newSpace ) : void

Called after the object is added to a space.

OnRemovalFromSpace ( ISpace oldSpace ) : void

Called before an object is removed from its space.

Protected Methods

Method Description
CalculateImpulse ( Entity e, float dt, Vector3 &impulse ) : void

Calculates the impulse to apply to the entity.

ForceField ( BEPUphysics.UpdateableSystems.ForceFields.ForceFieldShape shape ) : System

Constructs a force field.

PreUpdate ( ) : void

Performs any custom logic desired prior to the force application.

Private Methods

Method Description
CalculateImpulsesSubfunction ( int index ) : void
IDuringForcesUpdateable ( float dt ) : void

Applies forces specified by the given calculation delegate to bodies in the volume. Called automatically when needed by the owning Space.

Method Details

CalculateImpulse() protected abstract method

Calculates the impulse to apply to the entity.
protected abstract CalculateImpulse ( Entity e, float dt, Vector3 &impulse ) : void
e Entity Affected entity.
dt float Duration between simulation updates.
impulse Vector3 Impulse to apply to the entity.
return void

ForceField() protected method

Constructs a force field.
protected ForceField ( BEPUphysics.UpdateableSystems.ForceFields.ForceFieldShape shape ) : System
shape BEPUphysics.UpdateableSystems.ForceFields.ForceFieldShape Shape to use for the force field.
return System

OnAdditionToSpace() public method

Called after the object is added to a space.
public OnAdditionToSpace ( ISpace newSpace ) : void
newSpace ISpace Space to which the field has been added.
return void

OnRemovalFromSpace() public method

Called before an object is removed from its space.
public OnRemovalFromSpace ( ISpace oldSpace ) : void
oldSpace ISpace Space from which the object has been removed.
return void

PreUpdate() protected method

Performs any custom logic desired prior to the force application.
protected PreUpdate ( ) : void
return void