Creating updaters
With the core particle system all built up, it is time to focus on individual bits and pieces that will give our system its functionality and polish. By the time we are done, these are some of the effects that will be possible:
The only way to get there is to keep going, so let us get to it!
Spatial updater
First, and probably the most obvious task is adjusting particle positions based on their kinematic states. As small as they may be, they still operate based on changes in velocity, acceleration, and position:
class SpatialUpdater : public BaseUpdater { public: void Update(float l_dT, ParticleContainer* l_particles) { auto& velocities = l_particles->m_velocity; auto& accelerations = l_particles->m_acceleration; for (size_t i = 0; i < l_particles->m_countAlive; ++i) { velocities[i] += accelerations[i] * l_dT; } auto& positions = l_particles->m_position; for (size_t i = 0; i < l_particles->m_countAlive...