diff options
author | Stijn Buys <ingar@osirion.org> | 2010-11-17 22:49:18 +0000 |
---|---|---|
committer | Stijn Buys <ingar@osirion.org> | 2010-11-17 22:49:18 +0000 |
commit | ee017172af06f4b247038510e5ef7f8ac3596f66 (patch) | |
tree | d5103d67ed5e403a651c9963e8ae6e6aa2d5240d /src/model/tags.h | |
parent | 145ce988324b8b7b1f2b329f618ad5c6dfc4aac9 (diff) |
Cleaned up model::Mapfile axis related keys in the map reader, added warning messages where approriate. Support for multiple particle systems in render::ParticleScript. Cleaned up render::ParticleScript member variable names. Added support for axis related keys and scale key in particle scripts.
Diffstat (limited to 'src/model/tags.h')
-rw-r--r-- | src/model/tags.h | 61 |
1 files changed, 46 insertions, 15 deletions
diff --git a/src/model/tags.h b/src/model/tags.h index 881b914..af1bc27 100644 --- a/src/model/tags.h +++ b/src/model/tags.h @@ -47,12 +47,6 @@ public: Tag(const Tag& other); /** - * @brief constructor with location - * @param location location of this part within the parent model - */ - Tag(const math::Vector3f& location); - - /** * @brief default destructor */ ~Tag(); @@ -311,16 +305,28 @@ private: class Particles : public Tag { public: + /** + * @brief default constructor + */ Particles(); - Particles(const math::Vector3f & location); + /** + * @brief copy constructor + */ + Particles(const Particles & other); + /** + * @brief destructor + */ ~Particles(); inline const math::Axis &axis() const { return particles_axis; } + /** + * @brief name of the script to load + */ inline const std::string& script() const { return particles_script; } @@ -333,8 +339,8 @@ public: return particles_engine; } - inline float radius() const { - return particles_radius; + inline float scale() const { + return particles_scale; } inline Cull cull() const { @@ -357,10 +363,6 @@ public: particles_engine = engine; } - inline void set_radius(const float radius) { - particles_radius = radius; - } - inline void set_cull(const Cull cull) { particles_cull = cull; } @@ -368,6 +370,10 @@ public: inline void set_script(const std::string& script) { particles_script.assign(script); } + + inline void set_scale(const float scale) { + particles_scale = scale; + } /* ---- actors --------------------------------------------- */ @@ -384,8 +390,8 @@ private: Cull particles_cull; - float particles_radius; - + float particles_scale; + math::Axis particles_axis; std::string particles_script; }; @@ -396,6 +402,9 @@ private: class Dock : public Tag { public: + /** + * @brief default constructor + */ Dock(); /** @@ -403,8 +412,15 @@ public: */ Dock(const Dock& other); + /** + * @brief destructor + */ ~Dock(); + inline const math::Axis &axis() const { + return dock_axis; + } + /// dock radius, default is 0.01f inline float radius() const { return dock_radius; @@ -415,8 +431,23 @@ public: dock_radius = radius; } + /// set dock axis + inline void set_axis(const math::Axis& axis) { + dock_axis.assign(axis); + } + + /* ---- actors --------------------------------------------- */ + + /** + * @brief mutable reference to the axis + */ + inline math::Axis& get_axis() { + return dock_axis; + } + private: float dock_radius; + math::Axis dock_axis; }; /* ---- class Sound ------------------------------------------------ */ |