-
Notifications
You must be signed in to change notification settings - Fork 0
/
Channel.h
53 lines (39 loc) · 1.17 KB
/
Channel.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
44
45
46
47
48
49
50
51
52
53
#ifndef CHANNEL_H
#define CHANNEL_H
#include <QVector>
class Keyframe;
class Channel
{
public:
enum ExtrapolateType {
Constant,
Linear,
Cycle,
CycleOffset,
Bounce
};
Channel();
virtual ~Channel();
QVector<Keyframe*> const& keys() const;
void setKeys(QVector<Keyframe*> const& keys);
Keyframe* key(int idx) const;
void setKey(int idx, Keyframe* key);
ExtrapolateType extrapolationIn() const;
void setExtrapolationIn(ExtrapolateType extrapolationIn);
ExtrapolateType extrapolationOut() const;
void setExtrapolationOut(ExtrapolateType extrapolationOut);
void preCompute();
float evaluate(float t);
float startTime() const;
float endTime() const;
float minValue() const;
float maxValue() const;
void sortKeys();
void addKey(Keyframe* key);
void deleteKey(Keyframe* key);
private:
QVector<Keyframe*> _keys;
ExtrapolateType _extrapolationIn;
ExtrapolateType _extrapolationOut;
};
#endif // CHANNEL_H