#ifndef MSP_GL_KEYFRAME_H_
#define MSP_GL_KEYFRAME_H_
+#include <msp/core/refptr.h>
#include <msp/datafile/objectloader.h>
#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<KeyFrame>
+ class Loader: public DataFile::CollectionObjectLoader<KeyFrame>
{
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);
private:
Matrix matrix;
+ RefPtr<const Pose> 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