diff options
author | Stijn Buys <ingar@osirion.org> | 2013-04-16 21:06:49 +0000 |
---|---|---|
committer | Stijn Buys <ingar@osirion.org> | 2013-04-16 21:06:49 +0000 |
commit | 2c8331414db790824df9e9e2ea6e25ad7aa39b99 (patch) | |
tree | 387bd65dc1d0c6fde5942dce0591c430a6eb9053 /src/render/particle.h | |
parent | c625314940a3e41c28aff7a311ccd7ad2d0bf8d7 (diff) |
Support for 'colorsecond' in particle scripts, have trail style particles use a single texture for the entire length instead of repeating it.
Diffstat (limited to 'src/render/particle.h')
-rw-r--r-- | src/render/particle.h | 24 |
1 files changed, 16 insertions, 8 deletions
diff --git a/src/render/particle.h b/src/render/particle.h index c259dbc..742a03a 100644 --- a/src/render/particle.h +++ b/src/render/particle.h @@ -59,11 +59,11 @@ public: } /** - * @brief alpha value of the particle + * @brief color of the particle * */ - const float alpha() const + const math::Color color() const { - return particle_alpha; + return particle_color; } /** @@ -130,11 +130,19 @@ public: } /** - * @brief set the alpha value of the particle + * @brief set the color of the particle * */ - inline void set_alpha(const float alpha) + inline void set_color(const math::Color color) { - particle_alpha = alpha; + particle_color.assign(color); + } + + /** + * @brief return a reference to the color of the particle + * */ + math::Color & get_color() + { + return particle_color; } /** @@ -148,9 +156,9 @@ public: protected: math::Vector3f particle_location; + math::Color particle_color; math::Axis particle_axis; - float particle_radius; - float particle_alpha; + float particle_radius; float particle_rotation; float particle_speed; unsigned long particle_timestamp; |