diff options
Diffstat (limited to 'src/model/fragment.h')
-rw-r--r-- | src/model/fragment.h | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/src/model/fragment.h b/src/model/fragment.h index 31b7b96..58ff4bb 100644 --- a/src/model/fragment.h +++ b/src/model/fragment.h @@ -79,7 +79,7 @@ private: class FragmentGroup { public: - enum Type {None = 0, Rotate = 1, Door = 2 }; + enum Type {None = 0, Rotate = 1, Move = 3, Door = 2 }; /// type definition for a list of model fragments typedef std::list<Fragment *> Fragments; @@ -105,6 +105,10 @@ public: inline const float speed() const { return group_speed; } + + inline const float distance() const { + return group_distance; + } inline const float scale() const { return group_scale; @@ -140,13 +144,28 @@ public: group_location.assign(location); } + /** + * @brief rotation axis + * For normal groups, this is the transformation matrix + * For rotating groups axis->forward() is the axis of the rotation. + * For movers, axis->forward() is the axis of movement. + */ inline void set_axis(const math::Axis &axis) { group_axis.assign(axis); } + /** + * @brief movement speed + * For rotating groups this is the number of degrees per second + * For movers, this is the speed in units per second + */ inline void set_speed(const float speed) { group_speed = speed; } + + inline void set_distance(const float distance) { + group_distance = distance; + } inline void set_scale(const float scale) { group_scale = scale; @@ -170,6 +189,7 @@ private: Type group_type; float group_speed; float group_scale; + float group_distance; bool group_transform; bool group_engine; |