diff options
author | Stijn Buys <ingar@osirion.org> | 2013-01-20 21:37:11 +0000 |
---|---|---|
committer | Stijn Buys <ingar@osirion.org> | 2013-01-20 21:37:11 +0000 |
commit | d4f9da2f3c19511b028da2569d7b6a8d1371e135 (patch) | |
tree | e1bba0d8dd3b15169612f865612d3fca6475639a /src/render/particles.h | |
parent | 4feff2411d1b703a3b93d8a342112bd998b1ffed (diff) |
Major overhaul of the particle system back-end, support multiple ejectors per particle system.
Diffstat (limited to 'src/render/particles.h')
-rw-r--r-- | src/render/particles.h | 122 |
1 files changed, 2 insertions, 120 deletions
diff --git a/src/render/particles.h b/src/render/particles.h index 4c3de0e..b329b7f 100644 --- a/src/render/particles.h +++ b/src/render/particles.h @@ -4,6 +4,8 @@ the terms of the GNU General Public License version 2 */ +#error do not include this header + #ifndef __INCLUDED_RENDER_PARTICLES_H__ #define __INCLUDED_RENDER_PARTICLES_H__ @@ -47,126 +49,6 @@ protected: float particle_time; }; -/* ---- class ParticleScript --------------------------------------- */ - -/// class to hold particle scripts -class ParticleScript -{ -public: - - enum Type {Jet = 0, Trail = 1, Flame = 2, Spray = 3 }; - - inline const Type type() const { - return particlescript_type; - } - - inline const std::string &label() const { - return particlescript_label; - } - - inline const std::string &texture() const { - return particlescript_texture; - } - - inline const math::Color &color() const { - return particlescript_color; - } - - /// axis transformation relative to the ejector - inline const math::Axis &axis() const { - return particlescript_axis; - } - - /// true if entity color is to be applied - inline bool engine() const { - return particlescript_engine; - } - - /** - * @brief true if entity primary color is to be applied - * */ - inline bool entity() const - { - return particlescript_entity; - } - - /** - * @brief true if entity secondary color is to be applied - * */ - inline bool entity_second() const - { - return particlescript_entity_second; - } - - inline float radius() const { - return particlescript_radius; - } - - inline float timeout() const { - return particlescript_timeout; - } - - inline float eject() const { - return particlescript_eject; - } - - inline float speed() const { - return particlescript_speed; - } - - inline float alpha() const { - return particlescript_alpha; - } - - inline float offset() const { - return particlescript_offset; - } - - inline const model::Cull cull() const { - return particlescript_cull; - } - - inline const ParticleScript *next() const { - return particlescript_next; - } - - static ParticleScript *load(const std::string &label); - - static void clear(); - - static void list(); - -private: - static ParticleScript *find(const std::string &label); - - ParticleScript(const std::string & label); - ~ParticleScript(); - - std::string particlescript_label; - std::string particlescript_texture; - Type particlescript_type; - math::Color particlescript_color; - math::Axis particlescript_axis; - - bool particlescript_entity; - bool particlescript_entity_second; - bool particlescript_engine; - - float particlescript_radius; - float particlescript_timeout; - float particlescript_eject; - float particlescript_speed; - float particlescript_alpha; - float particlescript_offset; - - model::Cull particlescript_cull; - - ParticleScript *particlescript_next; - - typedef std::map<std::string, ParticleScript *> Registry; - - static Registry particlescript_registry; -}; /* ---- class ParticleSystem --------------------------------------- */ |