YourGameLib
Loading...
Searching...
No Matches
Public Attributes | List of all members
yourgame::math::Particles::Config Struct Reference

Particle system configuration. More...

#include <particles.h>

Public Attributes

size_t count = 100
 number of particles
 
unsigned int seed = static_cast<unsigned int>(std::time(nullptr))
 seed for random generator
 
bool scatterOnInit = true
 if true, particles are scattered in the volume when system is initialized
 
bool scatterOnSpawn = false
 if true, particles are scattered when they are respawned
 
bool respawn = true
 if true, particles are respawned after their lifetime ends
 
glm::vec3 origin = {0.0f, 0.0f, 0.0f}
 origin of the system
 
glm::vec3 emitterA = {0.0f, 0.0f, 0.0f}
 first vector that forms a volume inside particles are spawned
 
glm::vec3 emitterB = {0.0f, 0.0f, 0.0f}
 second vector that forms a volume inside particles are spawned
 
glm::vec3 emitterC = {0.0f, 0.0f, 0.0f}
 third vector that forms a volume inside particles are spawned
 
glm::vec3 baseDirection = {0.0f, 1.0f, 0.0f}
 base direction of particles
 
glm::vec3 noisDirection = {0.2f, 0.2f, 0.2f}
 uniform noise for direction
 
float baseVelocity = 1.5f
 base velocity of particles
 
float noisVelocity = 0.2f
 uniform noise for velocity
 
float baseLifetime = 3.0f
 base lifetime of particles
 
float noisLifetime = 0.4f
 uniform noise for lifetime
 

Detailed Description

Particle system configuration.

Should be configured and handed over to Particles() ctor. Can be changed during runtime via Particles::m_cfg.

Member Data Documentation

◆ baseDirection

glm::vec3 yourgame::math::Particles::Config::baseDirection = {0.0f, 1.0f, 0.0f}

base direction of particles

◆ baseLifetime

float yourgame::math::Particles::Config::baseLifetime = 3.0f

base lifetime of particles

◆ baseVelocity

float yourgame::math::Particles::Config::baseVelocity = 1.5f

base velocity of particles

◆ count

size_t yourgame::math::Particles::Config::count = 100

number of particles

◆ emitterA

glm::vec3 yourgame::math::Particles::Config::emitterA = {0.0f, 0.0f, 0.0f}

first vector that forms a volume inside particles are spawned

◆ emitterB

glm::vec3 yourgame::math::Particles::Config::emitterB = {0.0f, 0.0f, 0.0f}

second vector that forms a volume inside particles are spawned

◆ emitterC

glm::vec3 yourgame::math::Particles::Config::emitterC = {0.0f, 0.0f, 0.0f}

third vector that forms a volume inside particles are spawned

◆ noisDirection

glm::vec3 yourgame::math::Particles::Config::noisDirection = {0.2f, 0.2f, 0.2f}

uniform noise for direction

◆ noisLifetime

float yourgame::math::Particles::Config::noisLifetime = 0.4f

uniform noise for lifetime

◆ noisVelocity

float yourgame::math::Particles::Config::noisVelocity = 0.2f

uniform noise for velocity

◆ origin

glm::vec3 yourgame::math::Particles::Config::origin = {0.0f, 0.0f, 0.0f}

origin of the system

◆ respawn

bool yourgame::math::Particles::Config::respawn = true

if true, particles are respawned after their lifetime ends

◆ scatterOnInit

bool yourgame::math::Particles::Config::scatterOnInit = true

if true, particles are scattered in the volume when system is initialized

◆ scatterOnSpawn

bool yourgame::math::Particles::Config::scatterOnSpawn = false

if true, particles are scattered when they are respawned

◆ seed

unsigned int yourgame::math::Particles::Config::seed = static_cast<unsigned int>(std::time(nullptr))

seed for random generator


The documentation for this struct was generated from the following file: