MXVK Vulkan Framework 0.35.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
constexpr float SCENE_REFERENCE_ASPECT = 16.0f / 9.0f
constexpr float VERTICAL_FIELD_OF_VIEW_DEGREES = 45.0f

Function Documentation

◆ random_float()

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

Definition at line 44 of file fireworks.cpp.

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

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.

◆ SCENE_REFERENCE_ASPECT

float anonymous_namespace{fireworks.cpp}::SCENE_REFERENCE_ASPECT = 16.0f / 9.0f
constexpr

Definition at line 29 of file fireworks.cpp.

◆ VERTICAL_FIELD_OF_VIEW_DEGREES

float anonymous_namespace{fireworks.cpp}::VERTICAL_FIELD_OF_VIEW_DEGREES = 45.0f
constexpr

Definition at line 30 of file fireworks.cpp.