X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fkeyframe.h;h=ccfbda9a4f0cdf3dd2107f7e60ed028dd77f0021;hb=fe5bf090db687ef1dd1084218156bcbc0b801081;hp=4b0fa5bdcafd1c9b313654a4cb27cca7a3c65ed1;hpb=4c5ba8f7d3bc755d6256cb6bf75907a1b10fc290;p=libs%2Fgl.git diff --git a/source/keyframe.h b/source/keyframe.h index 4b0fa5bd..ccfbda9a 100644 --- a/source/keyframe.h +++ b/source/keyframe.h @@ -1,23 +1,31 @@ #ifndef MSP_GL_KEYFRAME_H_ #define MSP_GL_KEYFRAME_H_ +#include #include #include "matrix.h" namespace Msp { namespace GL { +class Pose; + /** Keyframes are used to encapsulate object state for animation. */ class KeyFrame { public: - class Loader: public DataFile::ObjectLoader + class Loader: public DataFile::CollectionObjectLoader { public: Loader(KeyFrame &); + Loader(KeyFrame &, Collection &); private: + void init(); + + void pose(const std::string &); + void pose_inline(); void position(float, float, float); void rotation(float, float, float, float); void scaling_uniform(float); @@ -26,9 +34,13 @@ public: private: Matrix matrix; + RefPtr pose; public: + void set_matrix(const Matrix &); + void set_pose(const Pose &); const Matrix &get_matrix() const { return matrix; } + const Pose *get_pose() const { return pose.get(); } }; } // namespace GL