-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathLightFader.h
43 lines (33 loc) · 1.07 KB
/
LightFader.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
// Light fader
// -------------------------------------------------------------------
// Copyright (C) 2007 OpenEngine.dk (See AUTHORS)
//
// This program is free software; It is covered by the GNU General
// Public License version 2 or any later version.
// See the GNU General Public License for more details (see LICENSE).
//--------------------------------------------------------------------
#ifndef _LIGHT_FADER_H_
#define _LIGHT_FADER_H_
// inherits from
#include <Core/IListener.h>
#include <Core/EngineEvents.h>
#include <Geometry/Light.h>
#include <Utils/Timer.h>
using OpenEngine::Core::IListener;
using OpenEngine::Core::ProcessEventArg;
using OpenEngine::Geometry::Light;
using OpenEngine::Utils::Timer;
class LightFader : public IListener<ProcessEventArg> {
private:
Light* from;
Light* to;
Light* lightNode;
float time, beginPct, endPct, timeSpend;
bool done;
Timer timer;
public:
LightFader(Light* from, Light* to, Light* lightNode, float time);
virtual ~LightFader();
void Handle(ProcessEventArg arg);
};
#endif // _LIGHT_FADER_H_