X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fkeyframe.h;h=6a8c5a447e60ab8c5f0575f47854e9019e145090;hb=8b9d1625ac367114612b57a83901033ffc2bc7e0;hp=bc3d65ecbfa80fec692d21f326f4e016e2bd5df7;hpb=8cbb77df13c4a0e6d6ae0f8b32913cf7e5b2f59c;p=libs%2Fgl.git diff --git a/source/keyframe.h b/source/keyframe.h index bc3d65ec..6a8c5a44 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,10 +34,16 @@ public: private: Matrix matrix; + RefPtr pose; public: + KeyFrame(); + ~KeyFrame(); + 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