]> git.tdb.fi Git - libs/gl.git/blob - source/animatedobject.h
Plug a memory leak
[libs/gl.git] / source / animatedobject.h
1 #ifndef MSP_GL_ANIMATEDOBJECT_H_
2 #define MSP_GL_ANIMATEDOBJECT_H_
3
4 #include <vector>
5 #include "matrix.h"
6 #include "objectinstance.h"
7
8 namespace Msp {
9 namespace GL {
10
11 /**
12 An object instance that can be animated.  Despite the name, this can also be
13 useful for displaying objects at a static position.
14 */
15 class AnimatedObject: public ObjectInstance
16 {
17 private:
18         Matrix matrix;
19         std::vector<float> pose_data;
20         ProgramData *shdata;
21
22 public:
23         AnimatedObject(const Object &);
24         ~AnimatedObject();
25
26         void set_matrix(const Matrix &);
27         void set_pose_matrix(unsigned, const Matrix &);
28
29         virtual void setup_render(Renderer &, const Tag &) const;
30 };
31
32 } // namespace GL
33 } // namespace Msp
34
35 #endif