diff options
author | Stijn Buys <ingar@osirion.org> | 2012-04-22 19:48:03 +0000 |
---|---|---|
committer | Stijn Buys <ingar@osirion.org> | 2012-04-22 19:48:03 +0000 |
commit | d1931b1ebbe79cbd0f41290acbf9cb6d4c462878 (patch) | |
tree | edc63a618e7493c6d7ed68401f0e83cc9f2894b5 /src/model/tags.h | |
parent | cef2128c1ed1fc3c1ed86b332da7ea8cfbf7757e (diff) |
Load model weapon tags.
Diffstat (limited to 'src/model/tags.h')
-rw-r--r-- | src/model/tags.h | 57 |
1 files changed, 57 insertions, 0 deletions
diff --git a/src/model/tags.h b/src/model/tags.h index 586fd21..ff95954 100644 --- a/src/model/tags.h +++ b/src/model/tags.h @@ -556,6 +556,63 @@ private: math::Axis submodel_axis; }; +/* ---- class Weapon ----------------------------------------------- */ + +/** + * @brief a weapon slot tag + * */ +class Weapon : public Tag +{ +public: + /** + * @brief default constructor + */ + Weapon(); + + /** + * @brief copy constructor + */ + Weapon(const Weapon& other); + + /** + * @brief destructor + */ + ~Weapon(); + + inline const math::Axis &axis() const { + return weapon_axis; + } + + /// weapon slot radius, default is 0.01f + inline float radius() const { + return weapon_radius; + } + + /// set weapon slot radius + inline void set_radius(const float radius) { + weapon_radius = radius; + } + + /// set weapon slot axis + inline void set_axis(const math::Axis& axis) { + weapon_axis.assign(axis); + } + + /* ---- actors --------------------------------------------- */ + + /** + * @brief mutable reference to the axis + */ + inline math::Axis& get_axis() { + return weapon_axis; + } + +private: + float weapon_radius; + math::Axis weapon_axis; +}; + + } #endif // __INCLUDED_MODEL_PARTS_H__ |