Click or drag to resize
DigitalRuneExplosion Class
Applies an explosion force for a short duration.
Inheritance Hierarchy

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

The Explosion type exposes the following members.

Constructors
  NameDescription
Public methodExplosion
Initializes a new instance of the Explosion class.
Public methodExplosion(IAreaOfEffect)
Initializes a new instance of the Explosion class.
Top
Methods
  NameDescription
Public methodApply
Applies the force effect to the specified body.
(Overrides ForceFieldApply(RigidBody).)
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.
(Overrides ForceEffectOnAddToSimulation.)
Protected methodOnApply
Called when the simulation wants this force effect to apply forces to rigid bodies.
(Overrides ForceFieldOnApply.)
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.
(Inherited from ForceField.)
Public propertyDuration
Gets or sets the duration of the explosion.
Public propertyEnabled
Gets or sets a value indicating whether this ForceEffect is enabled.
(Inherited from ForceEffect.)
Public propertyForce
Gets or sets the force magnitude of the explosion.
Public propertyPosition
Gets or sets the position of the center of the explosion.
Public propertyRadius
Gets or sets the explosion radius.
Public propertySimulation
Gets the simulation to which this force effect belongs.
(Inherited from ForceEffect.)
Top
Remarks

The explosion starts immediately after it is added to a Simulation. When the effect has ended (see Duration) it removes itself automatically from the ForceEffects collection of the Simulation.

Explosion Model: The effect applies a force that pushes rigid bodies away from the center of the explosion (see Position). The effect is only applied to the rigid body's center of mass - size, shape and orientation of the rigid body is ignored. The force effect has a linear falloff, i.e. a rigid body in n units distance experiences only 1/n of the force.

See Also