1 #ifndef MSP_DEMOSCENE_CAMERACONTROL_H_
2 #define MSP_DEMOSCENE_CAMERACONTROL_H_
4 #include <msp/gl/animationplayer.h>
5 #include <msp/gl/camera.h>
8 class CameraControl: public Action
11 class SetCamera: public Action
14 CameraControl &control;
15 const Msp::GL::Camera &camera;
18 SetCamera(CameraControl &, const Msp::GL::Camera &);
20 virtual void validate() const { }
22 virtual void start(float, float);
25 class AnimateCamera: public Action
28 CameraControl &control;
29 const Msp::GL::Animation &anim;
32 AnimateCamera(CameraControl &, const Msp::GL::Animation &);
34 virtual void validate() const { }
36 virtual void start(float, float);
40 Msp::GL::Camera camera;
41 Msp::GL::AnimationPlayer anim_player;
44 void set_camera(const Msp::GL::Camera &);
45 void animate_camera(const Msp::GL::Animation &, float);
46 Msp::GL::Camera &get_camera() { return camera; }
48 virtual void validate() const { }
50 virtual void tick(float, float);