Click or drag to resize
DigitalRuneParticleEffector Class
Manipulates a particle system and/or its particles.
Inheritance Hierarchy
SystemObject
  DigitalRune.ParticlesParticleEffector
    More...

Namespace: DigitalRune.Particles
Assembly: DigitalRune.Particles (in DigitalRune.Particles.dll) Version: 1.4.0.0 (1.4.1.14427)
Syntax
public abstract class ParticleEffector : INamedObject

The ParticleEffector type exposes the following members.

Constructors
  NameDescription
Protected methodParticleEffector
Initializes a new instance of the ParticleEffector class.
Top
Methods
  NameDescription
Public methodBeginUpdate
Called when the particle system begins its update.
Public methodClone
Creates a new ParticleEffector that is a clone of the current instance.
Protected methodCloneCore
Makes the instance a clone of the specified ParticleEffector.
Protected methodCreateInstanceCore
When implemented in a derived class, creates a new instance of the ParticleEffector derived class.
Public methodEndUpdate
Called when the particle system finishes its update.
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.)
Public methodInitialize
Initializes this particle effector.
Public methodInitializeParticles
Initializes new particles.
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Protected methodOnBeginUpdate
Called when BeginUpdate(TimeSpan) was called.
Protected methodOnEndUpdate
Called when BeginUpdate(TimeSpan) was called.
Protected methodOnInitialize
Protected methodOnInitializeParticles
Protected methodOnRequeryParameters
Protected methodOnUninitialize
Protected methodOnUpdateParticles
Called when UpdateParticles(TimeSpan, Int32, Int32) was called.
Public methodRequeryParameters
Requeries the particle parameters.
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Public methodUninitialize
Uninitializes this particle effector.
Public methodUpdateParticles
Updates particles.
Top
Properties
  NameDescription
Public propertyEnabled
Gets or sets a value indicating whether this ParticleEffector is enabled.
Public propertyName
Gets the name of this particle effector.
Public propertyParticleSystem
Gets or sets the particle system.
Top
Remarks

The particle effectors need to be added to a ParticleSystem. They define the behavior of the particle system and/or its particles. An effector has several properties and methods that are automatically set or called by the ParticleSystem. The members are used in the following order:

  1. ParticleSystem is automatically set when the effector is added to a particle system (see property Effectors).
  2. RequeryParameters is called next. RequeryParameters calls OnRequeryParameters. Derived particle effectors can override this method to get all required particle parameters from the parameter collection of the particle system (see Parameters). The particle effector can store references to these parameters. Anytime the particle parameters are modified, RequeryParameters is called again.
  3. Initialize is called when the particle system is updated for the first time and anytime the particle system is reset (see Reset).
  4. Every time the particle system is updated, it calls BeginUpdate(TimeSpan) of all particle effectors. BeginUpdate(TimeSpan) calls OnBeginUpdate(TimeSpan). Derived particle effectors can override this method to create particles (see AddParticles(Int32, Object)), to change uniform particle parameters or to do other work.
  5. After BeginUpdate(TimeSpan) the particle system calls UpdateParticles(TimeSpan, Int32, Int32) of all particle effectors. UpdateParticles(TimeSpan, Int32, Int32) calls OnUpdateParticles(TimeSpan, Int32, Int32). Derived particle effectors can override this method to manipulate the particles.
  6. When the update of a particle system ends, it calls EndUpdate(TimeSpan) of all particle effectors. EndUpdate(TimeSpan) calls OnEndUpdate(TimeSpan). Derived particle effectors can override this method to perform additional checks, a clean up, or other tasks.
  7. Each time a set of new particles is created, the particle system calls InitializeParticles(Int32, Int32, Object). InitializeParticles(Int32, Int32, Object) calls OnInitializeParticles(Int32, Int32, Object). Derived particle effectors can override this method to initialize the particle parameters of newly created particles.
  8. When a particle effectors is removed from a particle system, Uninitialize is called. Uninitialize calls OnUninitialize. Derived classes can override this method to clean up any held resources.

Cloning: A particle effector can be cloned. When a clone is created using Clone, a new particle effectors is returned for use in another particle system. Clone does not set the property ParticleSystem of the clone. See also remarks of derived classes.

See Also
Inheritance Hierarchy
SystemObject
  DigitalRune.ParticlesParticleEffector
    DigitalRune.Particles.EffectorsAngularVelocityEffector
    DigitalRune.Particles.EffectorsFuncEffectorT, TResult
    DigitalRune.Particles.EffectorsFuncEffectorT1, T2, TResult
    DigitalRune.Particles.EffectorsLinearAccelerationEffector
    DigitalRune.Particles.EffectorsLinearVelocityEffector
    DigitalRune.Particles.EffectorsReserveParticleEffector
    DigitalRune.Particles.EffectorsSingleDampingEffector
    DigitalRune.Particles.EffectorsSingleFadeEffector
    DigitalRune.Particles.EffectorsSingleLerpEffector
    DigitalRune.Particles.EffectorsSingleLinearSegment3Effector
    DigitalRune.Particles.EffectorsStartDirectionEffector
    DigitalRune.Particles.EffectorsStartPositionEffector
    DigitalRune.Particles.EffectorsStartValueEffectorT
    DigitalRune.Particles.EffectorsStartVelocityBiasEffector
    DigitalRune.Particles.EffectorsStreamEmitter
    DigitalRune.Particles.EffectorsTimeToSingleEffector
    DigitalRune.Particles.EffectorsVector3FLerpEffector
    DigitalRune.Particles.EffectorsVector3FLinearSegment3Effector