Confetti
0.1.0
A C++ particle system using Vulkan
|
The particle system. More...
#include <Confetti/ParticleSystem.h>
Public Member Functions | |
ParticleSystem (std::shared_ptr< Vkx::Device > device, vk::CommandPool const &commandPool, vk::Queue const &queue) | |
Constructor. More... | |
void | update (float dt) |
Updates the system. More... | |
void | draw () const |
Draws all particles for all the emitters. | |
void | add (std::shared_ptr< BasicEmitter > pemitter) |
Registers a component. More... | |
void | add (std::shared_ptr< Appearance > appearance) |
void | add (std::shared_ptr< Environment > environment) |
bool | remove (BasicEmitter *emitter) |
Unregisters a component. More... | |
bool | remove (Appearance *appearance) |
bool | remove (Environment *environment) |
The particle system.
This class updates and draws particles associated with a set of emitters using a set of appearances and environments.
Confetti::ParticleSystem::ParticleSystem | ( | std::shared_ptr< Vkx::Device > | device, |
vk::CommandPool const & | commandPool, | ||
vk::Queue const & | queue | ||
) |
Constructor.
device | Device to draw the particle system on |
void Confetti::ParticleSystem::add | ( | std::shared_ptr< BasicEmitter > | emitter | ) |
Registers a component.
emitter | The emitter to register. |
void Confetti::ParticleSystem::add | ( | std::shared_ptr< Appearance > | appearance | ) |
appearance | The appearance to register. |
void Confetti::ParticleSystem::add | ( | std::shared_ptr< Environment > | environment | ) |
environment | The environment to register. |
bool Confetti::ParticleSystem::remove | ( | BasicEmitter * | emitter | ) |
Unregisters a component.
emitter | The emitter to unregister. |
bool Confetti::ParticleSystem::remove | ( | Appearance * | appearance | ) |
appearance | The appearance to unregister. |
bool Confetti::ParticleSystem::remove | ( | Environment * | environment | ) |
environment | The environment to unregister. |
void Confetti::ParticleSystem::update | ( | float | dt | ) |
Updates the system.
dt | Amount of time (seconds) that has passed since the last update. |