collapse_all
expand_all
collapse_allexpand_alldropdowndropdownHovercopycodecopycodeHighlight

collapse_all Collapse AllExpand All     dropdown Code: All Code: Multiple Code: C# Code: Visual Basic Code: Visual C++     dropdown Members: Show All Members: Filtered Members: Filtered Members: Filtered

[TCheckBoxFormControlObj]C#

[TCheckBoxFormControlObj]Visual Basic

[TCheckBoxFormControlObj]
Visual C++

[TCheckBoxFormControlObj]Include Protected Members

[TCheckBoxFormControlObj]
Include Inherited Members

DPSF API Documentation
DPSFDefaultBaseParticleSystem
<
(Of

<

(
<
'
Particle, Vertex>)>)> Methods
gradient

The DPSFDefaultBaseParticleSystem<(Of <(<'Particle, Vertex>)>)> type exposes the following members.

collapse_allMethods

 

Name

Description

pubmethod

AddParticle()()()()

Adds a new Particle to the particle system, at the start of the Active Particle List. This new Particle is initialized using the particle system's Particle Initialization Function

(Inherited from DPSF<(Of <(<'Particle, Vertex>)>)>.)

pubmethod

AddParticle(Particle)

Adds a new Particle to the particle system, at the start of the Active Particle List. Returns true if the Particle was added, false if there is not enough memory for another Particle.

(Inherited from DPSF<(Of <(<'Particle, Vertex>)>)>.)

pubmethod

AddParticles(Int32)

Adds the specified number of new Particles to the particle system.

These new Particles are initialized using the particle system's Particle Initialization Function.

(Inherited from DPSF<(Of <(<'Particle, Vertex>)>)>.)

pubmethod

AddParticles(Int32, ParticleEmitterLerpInfo)

Adds the specified number of new Particles to the particle system, linearly interpolating (Lerp) the Emitter's Position/Orientation to be between its Previous Position/Orientation and current Position/Orientation when adding new particles.

Returns how many Particles were able to be added to the particle system.

These new Particles are initialized using the particle system's Particle Initialization Function.

(Inherited from DPSF<(Of <(<'Particle, Vertex>)>)>.)

pubmethod

AddParticles(Int32, Particle)

Adds the specified number of new Particles to the particle system, copying the properties of the given Particle To Copy.

NOTE: The Particle Initialization Function is not called when copying from an existing particle.

(Inherited from DPSF<(Of <(<'Particle, Vertex>)>)>.)

pubmethod

AddParticles(Int32, ParticleEmitter, Single)

Adds the specified number of new Particles to the particle system, linearly interpolating (Lerp) the Emitter's Position/Orientation to be between its Previous Position/Orientation and current Position/Orientation when adding new particles.

Returns how many Particles were able to be added to the particle system.

These new Particles are initialized using the particle system's Particle Initialization Function.

(Inherited from DPSF<(Of <(<'Particle, Vertex>)>)>.)

protmethod

AfterAddParticle

Virtual function that is called at the end of the AddParticle() function. This may be used to execute some code after a new Particle is initialized and added.

(Inherited from DPSF<(Of <(<'Particle, Vertex>)>)>.)

protmethod

AfterDestroy

Virtual function that is called at the end of the Destroy() function. This may be used to perform operations after the Particle System has been Destroyed, such as to destroy other Particle Systems nested within this Particle System.

(Inherited from DPSF<(Of <(<'Particle, Vertex>)>)>.)

protmethod

AfterDraw

Virtual function that is called at the end of the Draw() function. This may be used to perform operations after the Particle System has been drawn, such as to Draw Particle Systems nested within this Particle System.

(Inherited from DPSF<(Of <(<'Particle, Vertex>)>)>.)

protmethod

AfterInitialize

Virtual function that is called at the end of the Initialize() function. This may be used to perform operations after the Particle System has been Initialized, such as initializing other Particle Systems nested within this Particle System.

(Inherited from DPSF<(Of <(<'Particle, Vertex>)>)>.)

protmethod

AfterUpdate

Virtual function that is called at the end of the Update() function. This may be used to perform operations after the Particle System has been updated, such as to Update Particle Systems nested within this Particle System.

(Inherited from DPSF<(Of <(<'Particle, Vertex>)>)>.)

pubmethod

AutoInitialize

Virtual function to Initialize the Particle System with default values. Particle system properties should not be set until after this is called, as they are likely to be reset to their default values.

(Inherited from DPSF<(Of <(<'Particle, Vertex>)>)>.)

protmethod

BeforeAddParticle

Virtual function that is called at the beginning of the AddParticle() function. This may be used to execute some code before a new Particle is initialized and added.

(Inherited from DPSF<(Of <(<'Particle, Vertex>)>)>.)

protmethod

BeforeDestroy

Virtual function that is called at the beginning of the Destroy() function. This may be used to perform operations before the Destroy() code is executed.

(Inherited from DPSF<(Of <(<'Particle, Vertex>)>)>.)

protmethod

BeforeDraw

Virtual function that is called at the beginning of the Draw() function. This may be used to perform operations before the Draw() code is executed.

(Inherited from DPSF<(Of <(<'Particle, Vertex>)>)>.)

protmethod

BeforeUpdate

Virtual function that is called at the beginning of the Update() function. This may be used to perform operations before the Update() code is executed.

(Inherited from DPSF<(Of <(<'Particle, Vertex>)>)>.)

protmethod

CalculateForceMagnetShouldExertOnParticle

Returns the vector force that a Magnet should exert on a Particle

pubmethod

Destroy

Release all resources used by the Particle System and reset all properties to their default values

(Inherited from DPSF<(Of <(<'Particle, Vertex>)>)>.)

pubmethod

Draw

Draws all of the Active Particles to the Graphics Device.

NOTE: This will only Draw the Particle System if it does not inherit from DrawableGameComponent, since if it does it will be drawn automatically by the Game object.

(Inherited from DPSF<(Of <(<'Particle, Vertex>)>)>.)

pubmethod

DrawForced

Draws all of the Active Particles to the Graphics Device, even if the the Particle Systems inherits from DrawableGameComponent.

NOTE: If inheriting from DrawableGameComponent and this is called, the Particle System will be drawn twice per frame; once when it is called here, and again when automatically called by the Game object. If not inheriting from DrawableGameComponent, this acts the same as calling Draw().

(Inherited from DPSF<(Of <(<'Particle, Vertex>)>)>.)

protmethod

DrawSprite

Virtual function to draw a Sprite Particle. This function should be used to draw the given Particle with the provided SpriteBatch.

(Inherited from DPSF<(Of <(<'Particle, Vertex>)>)>.)

pubmethod

Equals

Determines whether the specified Object is equal to the current Object.

(Inherited from Object.)

protmethod

Finalize

Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.

(Inherited from Object.)

pubmethod

GetHashCode

Serves as a hash function for a particular type.

(Inherited from Object.)

pubmethod

GetType

Gets the Type of the current instance.

(Inherited from Object.)

pubmethod

InitializeNoDisplayParticleSystem

Initializes a new No Display Particle System. This type of Particle System does not allow any of the Particles to be drawn to a Graphics Device (e.g. the screen).

(Inherited from DPSF<(Of <(<'Particle, Vertex>)>)>.)

pubmethod

InitializeNonSerializableProperties

This function should be called immediately after deserializing a particle system in order to reinitialize the properties that could not be serialized.

NOTE: If this type of particle system requires a Texture, this function will attempt to load the Texture specified by the DeserializationTexturePath property. If it is unable to load a texture, an DPSFArgumentNullException will be thrown, so this function should be wrapped in a try block, and when an DPSFArgumentNullException is caught then the particle system's texture should be manually set.

NOTE: This will attempt to load the Effect and Technique specified by the DeserializationEffectPath and DeserializationTechniqueName properties. If either of these are null, the DPSFDefaultEffect will be used, and the default Technique for this type of particle system will be loaded.

NOTE: Particle systems can only be serialized (and thus, deserialized) if not inheriting from DrawableGameComponent (i.e. InheritsDrawableGameComponent == false. i.e. using the DPSF.dll, not DPSFAsDrawableGameComponent.dll).

(Inherited from DPSF<(Of <(<'Particle, Vertex>)>)>.)

pubmethod

InitializeParticle

Initialize the given Particle using the current Initialization Function

(Inherited from DPSF<(Of <(<'Particle, Vertex>)>)>.)

pubmethod

InitializeParticleUsingInitialProperties(DPSFParticle)

Function to Initialize a Default Particle with the Initial Settings

pubmethod

InitializeParticleUsingInitialProperties(DPSFParticle, DPSFDefaultBaseParticleSystem<(Of <<'(Particle, Vertex>)>>)..::..CInitialProperties)

Function to Initialize a Default Particle with the Initial Settings

pubmethod

InitializeQuadParticleSystem

Initializes a new Quad Particle System

(Inherited from DPSF<(Of <(<'Particle, Vertex>)>)>.)

protmethod

InitializeRenderProperties

Virtual function to setup the Render Properties (i.e. BlendState, DepthStencilState, RasterizerState, and SamplerState) which will be applied to the Graphics Device before drawing the Particle System's Particles.

This function is only called once when initializing the particle system.

(Inherited from DPSF<(Of <(<'Particle, Vertex>)>)>.)

pubmethod

InitializeSpriteParticleSystem(GraphicsDevice, ContentManager, Int32, Int32, Texture2D)

Initializes a new Sprite Particle System

(Inherited from DPSF<(Of <(<'Particle, Vertex>)>)>.)

pubmethod

InitializeSpriteParticleSystem(GraphicsDevice, ContentManager, Int32, Int32, String)

Initializes a new Sprite Particle System

(Inherited from DPSF<(Of <(<'Particle, Vertex>)>)>.)

pubmethod

InitializeSpriteParticleSystem(GraphicsDevice, ContentManager, Int32, Int32, Texture2D, SpriteBatch)

Initializes a new Sprite Particle System

(Inherited from DPSF<(Of <(<'Particle, Vertex>)>)>.)

pubmethod

InitializeSpriteParticleSystem(GraphicsDevice, ContentManager, Int32, Int32, String, SpriteBatch)

Initializes a new Sprite Particle System

(Inherited from DPSF<(Of <(<'Particle, Vertex>)>)>.)

pubmethod

InitializeTexturedQuadParticleSystem(GraphicsDevice, ContentManager, Int32, Int32, DPSF<(Of <<'(Particle, Vertex>)>>)..::..UpdateVertexDelegate, Texture2D)

Initializes a new Textured Quad Particle System

(Inherited from DPSF<(Of <(<'Particle, Vertex>)>)>.)

pubmethod

InitializeTexturedQuadParticleSystem(GraphicsDevice, ContentManager, Int32, Int32, DPSF<(Of <<'(Particle, Vertex>)>>)..::..UpdateVertexDelegate, String)

Initializes a new Textured Quad Particle System

(Inherited from DPSF<(Of <(<'Particle, Vertex>)>)>.)

protmethod

MemberwiseClone

Creates a shallow copy of the current Object.

(Inherited from Object.)

protmethod

MoveActiveParticleToInactiveParticleList

Moves the Active Particle's Linked List node to the Inactive Particle Linked List.

(Inherited from DPSF<(Of <(<'Particle, Vertex>)>)>.)

pubmethod

RemoveAllParticles

Removes all Active Particles from the Active Particle List and adds them to the Inactive Particle List

(Inherited from DPSF<(Of <(<'Particle, Vertex>)>)>.)

pubmethod

SetCameraPosition

Sets the Camera Position of the particle system, so that the particles know how to make themselves face the camera if needed. This virtual function does not do anything unless overridden, and all it should do is set an internal Vector3 variable (e.g. public Vector3 CameraPosition { get; set; }) to match the given Vector3.

(Inherited from DPSF<(Of <(<'Particle, Vertex>)>)>.)

pubmethod

SetDefaultEffect

Sets the Effect to be the default type for this type of particle system. This is done automatically when the particle system is initialized.

Default effect for each particle type is:

1.NoDisplay and Sprite - null.
2.Quad - BasicEffect.
3.TexturedQuad - AlphaTestEffect.

(Inherited from DPSF<(Of <(<'Particle, Vertex>)>)>.)

pubmethod

SetEffectAndTechnique(Effect, String)

Sets the Effect and Technique to use to draw the Particles.

NOTE: This will automatically set the DeserializationTechniqueName property to the given sTechnique.

(Inherited from DPSF<(Of <(<'Particle, Vertex>)>)>.)

pubmethod

SetEffectAndTechnique(String, String)

Sets the Effect and Technique to use to draw the Particles.

NOTE: This will automatically set the DeserializationEffectPath property to the given sEffect.

NOTE: This will automatically set the DeserializationTechniqueName property to the given sTechnique.

(Inherited from DPSF<(Of <(<'Particle, Vertex>)>)>.)

protmethod

SetEffectParameters

Virtual function to Set the Effect's Parameters before drawing the Particles.

This is called every time before the particle system is drawn.

(Inherited from DPSF<(Of <(<'Particle, Vertex>)>)>.)

pubmethod

SetGraphicsDevice

Sets the Graphics Device to use to the given graphics device.

NOTE: This only has an effect if the particle system does not inherit from DrawableGameComponent (i.e. InheritsDrawableGameComponent == false. i.e. using the DPSF.dll, not DPSFAsDrawableGameComponent.dll), since the Graphics Device is read-only when inheriting from DrawableGameComponent. The Game object's Graphics Device is always used when inheriting from DrawableGameComponent.

(Inherited from DPSF<(Of <(<'Particle, Vertex>)>)>.)

pubmethod

SetTechnique

Set which Technique of the current Effect to use to draw the Particles.

NOTE: This will automatically set the DeserializationTechniqueName property to the given sTechnique.

(Inherited from DPSF<(Of <(<'Particle, Vertex>)>)>.)

pubmethod

SetTexture

Set the Texture to use to draw the Particles

(Inherited from DPSF<(Of <(<'Particle, Vertex>)>)>.)

pubmethod

SetWorldViewProjectionMatrices

Set the World, View, and Projection matrices for this Particle System.

NOTE: Sprite particle systems are not affected by the World, View, and Projection matrices.

(Inherited from DPSF<(Of <(<'Particle, Vertex>)>)>.)

pubmethod

ToString

Returns a String that represents the current Object.

(Inherited from Object.)

pubmethod

Update

Updates the Particle System. This involves executing the Particle System Events, updating all Active Particles according to the Particle Events, and adding new Particles according to the Emitter settings.

NOTE: This will only Update the Particle System if it does not inherit from DrawableGameComponent, since if it does it will be updated automatically by the Game object.

(Inherited from DPSF<(Of <(<'Particle, Vertex>)>)>.)

pubmethod

UpdateForced

Updates the Particle System, even if the the Particle Systems inherits from DrawableGameComponent.

Updating the Particle System involves executing the Particle System Events, updating all Active Particles according to the Particle Events, and adding new Particles according to the Emitter settings.

NOTE: If inheriting from DrawableGameComponent and this is called, the Particle System will be updated twice per frame; once when it is called here, and again when automatically called by the Game object. If not inheriting from DrawableGameComponent, this acts the same as calling Update().

(Inherited from DPSF<(Of <(<'Particle, Vertex>)>)>.)

protmethod

UpdateParticleColorUsingLerp

Linearly interpolates the Particle's Color between it's Start Color and End Color based on the Particle's Normalized Elapsed Time.

protmethod

UpdateParticlePositionAccordingToMagnets

Calculates how much affect each of the Particle System's Magnets should have on this Particle and updates the Particle's Position accordingly.

protmethod

UpdateParticlePositionAndVelocityUsingAcceleration

Updates a Particle's Velocity according to its Acceleration, and then the Position according to the new Velocity

protmethod

UpdateParticlePositionUsingExternalForce

Applies the External Force to the Particle's Position

protmethod

UpdateParticlePositionUsingVelocity

Update a Particle's Position according to its Velocity

protmethod

UpdateParticleSystemDisableEmitter

Disables the Emitter

protmethod

UpdateParticleSystemEmitParticlesAutomaticallyOff

Sets the Emitter to not Emit Particles Automatically

protmethod

UpdateParticleSystemEmitParticlesAutomaticallyOn

Sets the Emitter to Emit Particles Automatically

protmethod

UpdateParticleSystemEnableEmitter

Enables the Emitter

protmethod

UpdateParticleTransparencyToFadeInUsingLerp

Linearly interpolates the Particle's Transparency to fade in based on the Particle's Normalized Elapsed Time.

If you are also updating the Particle Color using an EveryTime Event, be sure to set the ExecutionOrder of the event calling this function to be greater than that one, so that this function is called AFTER the color update function.

protmethod

UpdateParticleTransparencyToFadeOutUsingLerp

Linearly interpolates the Particle's Transparency to fade out based on the Particle's Normalized Elapsed Time.

If you are also updating the Particle Color using an EveryTime Event, be sure to set the ExecutionOrder of the event calling this function to be greater than that one, so that this function is called AFTER the color update function.

protmethod

UpdateParticleTransparencyWithQuickFadeIn


protmethod

UpdateParticleTransparencyWithQuickFadeInAndQuickFadeOut

Quickly fades the particle in when born and quickly fades it out as it approaches its death.

If you are also updating the Particle Color using an EveryTime Event, be sure to set the ExecutionOrder of the event calling this function to be greater than that one, so that this function is called AFTER the color update function.

protmethod

UpdateParticleTransparencyWithQuickFadeInAndSlowFadeOut

Quickly fades the particle in when born and slowly fades it out as it gets closer to death.

If you are also updating the Particle Color using an EveryTime Event, be sure to set the ExecutionOrder of the event calling this function to be greater than that one, so that this function is called AFTER the color update function.

protmethod

UpdateParticleTransparencyWithQuickFadeOut


protmethod

UpdateParticleVelocityAccordingToMagnets

Calculates how much affect each of the Particle System's Magnets should have on this Particle and updates the Particle's Velocity accordingly.

protmethod

UpdateParticleVelocityUsingAcceleration

Update a Particle's Velocity according to its Acceleration

protmethod

UpdateParticleVelocityUsingExternalForce

Applies the External Force to the Particle's Velocity

protmethod

UpdateParticleVelocityUsingFriction

Applies the Particle's Friction to the its Velocity to slow the Particle down to a stop

collapse_allSee Also

DPSFDefaultBaseParticleSystem<(Of <(<'Particle, Vertex>)>)> Class

DPSF Namespace

footer

Send comments on this topic to
Dan@DansKingdom.com