diff options
author | WBoerenkamps <wrj.boerenkamps@student.avans.nl> | 2024-12-17 14:50:08 +0100 |
---|---|---|
committer | WBoerenkamps <wrj.boerenkamps@student.avans.nl> | 2024-12-17 14:50:08 +0100 |
commit | c3c565f7c8d1e7e9899b8c2fbb1c313a45e4b10b (patch) | |
tree | 33b937a5c0cd3413078ac6fd9ccc82ee60763acd /src/crepe/system/ParticleSystem.h | |
parent | 4080a2eec207b35b36f7d0ceae7c2afcfcdfd977 (diff) | |
parent | 9232a98b72eee7af4f7f2153c1b2ccedbfa4cc65 (diff) |
Merge branch 'master' of https://github.com/lonkaars/crepe into wouter/text-component
Diffstat (limited to 'src/crepe/system/ParticleSystem.h')
-rw-r--r-- | src/crepe/system/ParticleSystem.h | 22 |
1 files changed, 2 insertions, 20 deletions
diff --git a/src/crepe/system/ParticleSystem.h b/src/crepe/system/ParticleSystem.h index 068f01c..154521d 100644 --- a/src/crepe/system/ParticleSystem.h +++ b/src/crepe/system/ParticleSystem.h @@ -32,16 +32,6 @@ private: void emit_particle(ParticleEmitter & emitter, const Transform & transform); /** - * \brief Calculates the number of times particles should be emitted based on emission rate - * and update count. - * - * \param count Current update count. - * \param emission Emission rate. - * \return The number of particles to emit. - */ - int calculate_update(int count, double emission) const; - - /** * \brief Checks whether particles are within the emitter’s boundary, resets or stops * particles if they exit. * @@ -57,7 +47,7 @@ private: * \param max_angle Maximum emission angle in degrees. * \return Random angle in degrees. */ - double generate_random_angle(double min_angle, double max_angle) const; + float generate_random_angle(float min_angle, float max_angle) const; /** * \brief Generates a random speed for particle emission within the specified range. @@ -66,15 +56,7 @@ private: * \param max_speed Maximum emission speed. * \return Random speed. */ - double generate_random_speed(double min_speed, double max_speed) const; - -private: - //! Counter to count updates to determine how many times emit_particle is - // called. - unsigned int update_count = 0; - //! Determines the lowest amount of emission rate (1000 = 0.001 = 1 particle per 1000 - // updates). - static constexpr unsigned int MAX_UPDATE_COUNT = 100; + float generate_random_speed(float min_speed, float max_speed) const; }; } // namespace crepe |