Particle Systems

A particle system consists of a large set of particles, which are usually treated as simple points with position, velocity, and color.



Individual particles are added to the system, move about, possibly affected by external forces such as gravity, and eventually die out.

struct _particle
    {
     dms::Vector3 position;
     dms::Vector3 tailPosition;
     dms::Vector3 velocity;
     dms::Vector3 color;
     float removeTime;
    };

struct _particle * particleArray;

The particle system code has three major parts:

Particles can be drawn in different ways, leading to different visual effects.
The simplest way is using points or lines.

Example:



next