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 by an AnimationPlayer.
16 class AnimatedObject: public ObjectInstance
19 class Loader: public DataFile::DerivedObjectLoader<AnimatedObject, ObjectInstance::Loader>
22 Loader(AnimatedObject &);
25 void position(float, float, float);
26 void rotation(float, float, float, float);
27 void scale(float, float, float);
28 void scale_uniform(float);
32 std::vector<float> pose_data;
36 AnimatedObject(const Object &);
39 void set_pose_matrix(unsigned, const Matrix &);
40 ProgramData &get_shader_data();
41 const ProgramData &get_shader_data() const;
44 void set_uniform(const std::string &, const KeyFrame::AnimatedUniform &);
46 virtual const Matrix *get_matrix() const { return &matrix; }
48 virtual void setup_render(Renderer &, const Tag &) const;