Click or drag to resize
DigitalRuneForceField Class
Applies a force effect to all bodies in the AreaOfEffect individually.
Inheritance Hierarchy

Namespace: DigitalRune.Physics.ForceEffects
Assembly: DigitalRune.Physics (in DigitalRune.Physics.dll) Version: 1.10.0.0 (1.10.0.14427)
Syntax
public abstract class ForceField : ForceEffect

The ForceField type exposes the following members.

Constructors
  NameDescription
Protected methodForceField
Initializes a new instance of the ForceField class.
Protected methodForceField(IAreaOfEffect)
Initializes a new instance of the ForceField class.
Top
Methods
  NameDescription
Public methodApply
Applies the force effect to the specified body.
Public methodEquals
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public methodGetHashCode
Serves as a hash function for a particular type.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Protected methodOnAddToSimulation
Called when this force effect is added to a simulation.
(Inherited from ForceEffect.)
Protected methodOnApply
Called when the simulation wants this force effect to apply forces to rigid bodies.
(Overrides ForceEffectOnApply.)
Protected methodOnDisabled
Called when this force effect was disabled.
(Inherited from ForceEffect.)
Protected methodOnEnabled
Called when this force effect was enabled.
(Inherited from ForceEffect.)
Protected methodOnRemoveFromSimulation
Called when this force effect is removed from a simulation.
(Inherited from ForceEffect.)
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Top
Properties
  NameDescription
Public propertyAreaOfEffect
Gets or sets the area of effect.
Public propertyEnabled
Gets or sets a value indicating whether this ForceEffect is enabled.
(Inherited from ForceEffect.)
Public propertySimulation
Gets the simulation to which this force effect belongs.
(Inherited from ForceEffect.)
Top
Remarks

A force field is a specialized force effect that applies a force to all bodies that are in the AreaOfEffect. The area of effect can be defined using collision detection, simple lists, or other means. Each body in the area of effect is treated individually.

Derived classes must implement the method Apply(RigidBody).

See Also