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