1 #ifndef MSP_GL_ANIMATEDOBJECT_H_
2 #define MSP_GL_ANIMATEDOBJECT_H_
5 #include <msp/datafile/objectloader.h>
8 #include "objectinstance.h"
14 An object instance that can be animated. Despite the name, this can also be
15 useful for displaying objects at a static position.
17 class AnimatedObject: public ObjectInstance
20 class Loader: public DataFile::ObjectLoader<AnimatedObject>
23 Loader(AnimatedObject &);
26 void position(float, float, float);
27 void rotation(float, float, float, float);
28 void scale(float, float, float);
29 void scale_uniform(float);
34 std::vector<float> pose_data;
38 AnimatedObject(const Object &);
41 void set_matrix(const Matrix &);
42 void set_pose_matrix(unsigned, const Matrix &);
43 void set_uniform(const std::string &, const KeyFrame::AnimatedUniform &);
45 virtual const Matrix *get_matrix() const { return &matrix; }
47 virtual void setup_render(Renderer &, const Tag &) const;