]> git.tdb.fi Git - libs/demoscene.git/blob - source/colorfade.h
Allow stages to define actions
[libs/demoscene.git] / source / colorfade.h
1 #ifndef MSP_DEMOSCENE_COLORFADE_H_
2 #define MSP_DEMOSCENE_COLORFADE_H_
3
4 #include <msp/gl/color.h>
5 #include "action.h"
6
7 namespace Msp {
8 namespace DemoScene {
9
10 class ColorFadeAction: public InterpolationAction
11 {
12 protected:
13         Msp::GL::Color start_color;
14         Msp::GL::Color end_color;
15
16         ColorFadeAction(const Msp::GL::Color &);
17
18 public:
19         virtual void start(float, float);
20         virtual void interpolate(float, float);
21         virtual const Msp::GL::Color &get_color() const = 0;
22         virtual void set_color(const Msp::GL::Color &) = 0;
23 };
24
25 } // namespace DemoScene
26 } // namespace Msp
27
28 #endif