20#ifndef YOURGAME_PARTICLES_H
21#define YOURGAME_PARTICLES_H
50 unsigned int seed =
static_cast<unsigned int>(std::time(
nullptr));
54 glm::vec3
origin = {0.0f, 0.0f, 0.0f};
72 virtual void tick(
float dt);
87 std::default_random_engine m_rndgen;
88 std::uniform_real_distribution<float> m_unirnd;
89 std::vector<Part> m_parts;
Definition particles.h:39
std::vector< float > m_progressData
Definition particles.h:76
std::vector< glm::vec4 > m_positionData
Definition particles.h:75
void reset()
Definition particles.cpp:61
Config m_cfg
Definition particles.h:74
virtual void tick(float dt)
ticks the particle system
Definition particles.cpp:34
Particle system configuration.
Definition particles.h:48
float baseLifetime
base lifetime of particles
Definition particles.h:62
glm::vec3 emitterC
third vector that forms a volume inside particles are spawned
Definition particles.h:57
float baseVelocity
base velocity of particles
Definition particles.h:60
glm::vec3 emitterB
second vector that forms a volume inside particles are spawned
Definition particles.h:56
bool respawn
if true, particles are respawned after their lifetime ends
Definition particles.h:53
glm::vec3 emitterA
first vector that forms a volume inside particles are spawned
Definition particles.h:55
bool scatterOnSpawn
if true, particles are scattered when they are respawned
Definition particles.h:52
size_t count
number of particles
Definition particles.h:49
float noisVelocity
uniform noise for velocity
Definition particles.h:61
unsigned int seed
seed for random generator
Definition particles.h:50
float noisLifetime
uniform noise for lifetime
Definition particles.h:63
glm::vec3 origin
origin of the system
Definition particles.h:54
glm::vec3 baseDirection
base direction of particles
Definition particles.h:58
bool scatterOnInit
if true, particles are scattered in the volume when system is initialized
Definition particles.h:51
glm::vec3 noisDirection
uniform noise for direction
Definition particles.h:59