DPSF by Daniel Schroeder

<PackageReference Include="DPSF" Version="2.5.0" />

.NET API 168,448 bytes

 DPSFDefaultSpriteParticleSystem<Particle, Vertex>

public abstract class DPSFDefaultSpriteParticleSystem<Particle, Vertex> : DPSFDefaultBaseParticleSystem<Particle, Vertex> where Particle : DPSFParticle where Vertex : struct, IDPSFParticleVertex
The Default Sprite Particle System class
public class CInitialPropertiesForSprite<Particle, Vertex> : CInitialProperties<Particle, Vertex> where Particle : DPSFParticle where Vertex : struct, IDPSFParticleVertex

Particle System Properties used to initialize a Particle's Properties.

NOTE: These are only applied to the Particle when the InitializeParticleUsingInitialProperties() function is set as the Particle Initialization Function.

public CInitialPropertiesForSprite<Particle, Vertex> InitialProperties { get; }

Get the Settings used to specify the Initial Properties of a new Particle.

NOTE: These are only applied to the Particle when the InitializeParticleUsingInitialProperties() function is set as the Particle Initialization Function.

Constructor

protected void UpdateParticleDepthFromBackToFrontUsingLerp(DefaultSpriteParticle cParticle, float fElapsedTimeInSeconds)

Linearly interpolate the Particle's Position.Z value from 1.0 (back) to 0.0 (front) according to the Particle's Normalized Lifetime

protected void UpdateParticleDepthFromFrontToBackUsingLerp(DefaultSpriteParticle cParticle, float fElapsedTimeInSeconds)

Linearly interpolate the Particle's Position.Z value from 0.0 (front) to 1.0 (back) according to the Particle's Normalized Lifetime

protected void UpdateParticleHeightUsingLerp(DefaultSpriteParticle cParticle, float fElapsedTimeInSeconds)

Linearly interpolate the Particle's Height between the Start and End Height according to the Particle's Normalized Lifetime

protected void UpdateParticleRotationalVelocityUsingRotationalAcceleration(DefaultSpriteParticle cParticle, float fElapsedTimeInSeconds)

Update a Particle's Rotational Velocity according to its Rotational Acceleration

Update a Particle's Rotation and Rotational Velocity according to its Rotational Acceleration

protected void UpdateParticleRotationUsingRotationalVelocity(DefaultSpriteParticle cParticle, float fElapsedTimeInSeconds)

Update a Particle's Rotation according to its Rotational Velocity

protected void UpdateParticleSystemToSortParticlesByDepth(float fElapsedTimeInSeconds)

Sorts the Particle System's Active Particles so that the Particles at the back (i.e. Position.Z = 1.0) are drawn before the Particles at the front (i.e. Position.Z = 0.0).

NOTE: This operation is very expensive and should only be used when you are using a Shader (i.e. Effect and Technique).

If you are not using a Shader and want the Particles sorted by Depth, use SpriteSortMode.BackToFront.

Merge Sort is the sorting algorithm used, as it tends to be best for linked lists. TODO - WHILE MERGE SORT SHOULD BE USED, DUE TO TIME CONSTRAINTS A (PROBABLY) SLOWER METHOD (QUICK-SORT) IS BEING USED INSTEAD. THIS FUNCTION NEEDS TO BE UPDATED TO USE MERGE SORT STILL. THE LINKED LIST MERGE SORT ALGORITHM CAN BE FOUND AT http://www.chiark.greenend.org.uk/~sgtatham/algorithms/listsort.html

protected void UpdateParticleWidthAndHeightUsingLerp(DefaultSpriteParticle cParticle, float fElapsedTimeInSeconds)

Linearly interpolate the Particle's Width and Height between the Start and End values according to the Particle's Normalized Lifetime

protected void UpdateParticleWidthUsingLerp(DefaultSpriteParticle cParticle, float fElapsedTimeInSeconds)

Linearly interpolate the Particle's Width between the Start and End Width according to the Particle's Normalized Lifetime