diff options
author | Loek Le Blansch <loek@pipeframe.xyz> | 2024-11-15 20:39:07 +0100 |
---|---|---|
committer | Loek Le Blansch <loek@pipeframe.xyz> | 2024-11-15 20:39:07 +0100 |
commit | e8cd950b8ebd152d76d588d4fedc7f4c239b0835 (patch) | |
tree | 7919d13a79d52f1365bc19bf1b435a6264ee5512 /src/crepe/system/ParticleSystem.h | |
parent | 5bee4515c1089ce3499bc3b74780db94f0c02306 (diff) | |
parent | 9f6475e7b0698c414138e2a8140b47f01ce9c5d1 (diff) |
merge `master` into `loek/cleanup`
Diffstat (limited to 'src/crepe/system/ParticleSystem.h')
-rw-r--r-- | src/crepe/system/ParticleSystem.h | 37 |
1 files changed, 16 insertions, 21 deletions
diff --git a/src/crepe/system/ParticleSystem.h b/src/crepe/system/ParticleSystem.h index 0acc2b9..0a2dde1 100644 --- a/src/crepe/system/ParticleSystem.h +++ b/src/crepe/system/ParticleSystem.h @@ -12,32 +12,30 @@ class ParticleEmitter; class Transform; /** - * \brief ParticleSystem class responsible for managing particle emission, - * updates, and bounds checking. - */ + * \brief ParticleSystem class responsible for managing particle emission, updates, and bounds + * checking. + */ class ParticleSystem : public System { public: using System::System; /** - * \brief Updates all particle emitters by emitting particles, updating - * particle states, and checking bounds. + * \brief Updates all particle emitters by emitting particles, updating particle states, and + * checking bounds. */ void update() override; private: /** - * \brief Emits a particle from the specified emitter based on its emission - * properties. + * \brief Emits a particle from the specified emitter based on its emission properties. * * \param emitter Reference to the ParticleEmitter. - * \param transform Const reference to the Transform component associated - * with the emitter. + * \param transform Const reference to the Transform component associated with the emitter. */ 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. + * \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. @@ -46,18 +44,16 @@ private: 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. + * \brief Checks whether particles are within the emitter’s boundary, resets or stops + * particles if they exit. * * \param emitter Reference to the ParticleEmitter. - * \param transform Const reference to the Transform component associated - * with the emitter. + * \param transform Const reference to the Transform component associated with the emitter. */ void check_bounds(ParticleEmitter & emitter, const Transform & transform); /** - * \brief Generates a random angle for particle emission within the specified - * range. + * \brief Generates a random angle for particle emission within the specified range. * * \param min_angle Minimum emission angle in degrees. * \param max_angle Maximum emission angle in degrees. @@ -66,8 +62,7 @@ private: double generate_random_angle(double min_angle, double max_angle) const; /** - * \brief Generates a random speed for particle emission within the specified - * range. + * \brief Generates a random speed for particle emission within the specified range. * * \param min_speed Minimum emission speed. * \param max_speed Maximum emission speed. @@ -79,8 +74,8 @@ 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). + //! Determines the lowest amount of emission rate (1000 = 0.001 = 1 particle per 1000 + // updates). static constexpr unsigned int MAX_UPDATE_COUNT = 100; }; |