MXVK Vulkan Framework 0.24.0
C++20 Vulkan rendering framework for practical 2D and 3D application development with SDL3.
Loading...
Searching...
No Matches
anonymous_namespace{fireworks.cpp} Namespace Reference

Classes

struct  Explosion
struct  Particle

Functions

float random_float (float min, float max)

Variables

constexpr std::size_t MAX_EXPLOSIONS = 256
constexpr float MAX_LIFETIME = 2.0f
constexpr std::size_t MAX_PARTICLES = PARTICLES_PER_EXPLOSION * MAX_EXPLOSIONS
constexpr float MIN_LIFETIME = 0.5f
constexpr float PARTICLE_SIZE = 25.0f
constexpr float PARTICLE_SPEED = 1.0f
constexpr std::size_t PARTICLES_PER_EXPLOSION = 250

Function Documentation

◆ random_float()

float anonymous_namespace{fireworks.cpp}::random_float ( float min,
float max )
nodiscard

Definition at line 42 of file fireworks.cpp.

42 {
43 static std::random_device rd;
44 static std::default_random_engine engine(rd());
45 std::uniform_real_distribution<float> dist(min, max);
46 return dist(engine);
47 }

Variable Documentation

◆ MAX_EXPLOSIONS

std::size_t anonymous_namespace{fireworks.cpp}::MAX_EXPLOSIONS = 256
constexpr

Definition at line 23 of file fireworks.cpp.

◆ MAX_LIFETIME

float anonymous_namespace{fireworks.cpp}::MAX_LIFETIME = 2.0f
constexpr

Definition at line 26 of file fireworks.cpp.

◆ MAX_PARTICLES

std::size_t anonymous_namespace{fireworks.cpp}::MAX_PARTICLES = PARTICLES_PER_EXPLOSION * MAX_EXPLOSIONS
constexpr

Definition at line 24 of file fireworks.cpp.

◆ MIN_LIFETIME

float anonymous_namespace{fireworks.cpp}::MIN_LIFETIME = 0.5f
constexpr

Definition at line 25 of file fireworks.cpp.

◆ PARTICLE_SIZE

float anonymous_namespace{fireworks.cpp}::PARTICLE_SIZE = 25.0f
constexpr

Definition at line 28 of file fireworks.cpp.

◆ PARTICLE_SPEED

float anonymous_namespace{fireworks.cpp}::PARTICLE_SPEED = 1.0f
constexpr

Definition at line 27 of file fireworks.cpp.

◆ PARTICLES_PER_EXPLOSION

std::size_t anonymous_namespace{fireworks.cpp}::PARTICLES_PER_EXPLOSION = 250
constexpr

Definition at line 22 of file fireworks.cpp.