diff options
Diffstat (limited to 'src/render/particle.h')
-rw-r--r-- | src/render/particle.h | 39 |
1 files changed, 28 insertions, 11 deletions
diff --git a/src/render/particle.h b/src/render/particle.h index 0370660..c259dbc 100644 --- a/src/render/particle.h +++ b/src/render/particle.h @@ -22,7 +22,7 @@ class Particle { public: Particle(const math::Vector3f &location, const unsigned long timestamp); - Particle(const math::Vector3f &location, const math::Vector3f &velocity, const unsigned long timestamp); + Particle(const math::Vector3f &location, const math::Axis &axis, const unsigned long timestamp); /* ---- inspectors ----------------------------------------- */ @@ -36,10 +36,18 @@ public: } /** - * @brief velocity vector of the particle + * @brief axis vector of the particle * */ - inline const math::Vector3f &velocity() const { - return particle_velocity; + inline const math::Axis &axis() const { + return particle_axis; + } + + /** + * @brief speed of the particle + * */ + const float speed() const + { + return particle_speed; } /** @@ -83,10 +91,10 @@ public: } /** - * @brief reference velocity vector of the particle + * @brief reference axis vector of the particle * */ - inline math::Vector3f &get_velocity() { - return particle_velocity; + inline math::Axis &get_axis() { + return particle_axis; } /** @@ -98,11 +106,19 @@ public: } /** - * @brief set the velocity of the particle + * @brief set the axis of the particle + * */ + inline void set_axis(const math::Axis &axis) + { + particle_axis.assign(axis); + } + + /** + * @brief set the speed of the particle * */ - inline void set_velocity(const math::Vector3f &velocity) + inline void set_speed(const float speed) { - particle_velocity.assign(velocity); + particle_speed = speed; } /** @@ -132,10 +148,11 @@ public: protected: math::Vector3f particle_location; - math::Vector3f particle_velocity; + math::Axis particle_axis; float particle_radius; float particle_alpha; float particle_rotation; + float particle_speed; unsigned long particle_timestamp; }; |