#define MSP_GL_ANIMATEDOBJECT_H_
#include <vector>
+#include <msp/core/attributes.h>
#include <msp/datafile/objectloader.h>
+#include "keyframe.h"
#include "matrix.h"
#include "objectinstance.h"
namespace GL {
/**
-An object instance that can be animated. Despite the name, this can also be
-useful for displaying objects at a static position.
+An object instance that can be animated by an AnimationPlayer.
*/
class AnimatedObject: public ObjectInstance
{
public:
- class Loader: public DataFile::ObjectLoader<AnimatedObject>
+ class Loader: public DataFile::DerivedObjectLoader<AnimatedObject, ObjectInstance::Loader>
{
public:
Loader(AnimatedObject &);
};
private:
- Matrix matrix;
std::vector<float> pose_data;
ProgramData *shdata;
AnimatedObject(const Object &);
~AnimatedObject();
- void set_matrix(const Matrix &);
void set_pose_matrix(unsigned, const Matrix &);
+ ProgramData &get_shader_data();
+ const ProgramData &get_shader_data() const;
+
+ DEPRECATED void set_uniform(const std::string &, const KeyFrame::AnimatedUniform &);
virtual const Matrix *get_matrix() const { return &matrix; }