-
Notifications
You must be signed in to change notification settings - Fork 2
/
interpolationHelper.h
72 lines (45 loc) · 1.27 KB
/
interpolationHelper.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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
#ifndef H_INTERPOLATIONHELPER
#define H_INTERPOLATIONHELPER
#include "actor.h"
//TODO: make subclasses of interpolators for different types - Matrix, Vector, etc...
class Renderer;
class InterpolationHelper{
public:
float mergeFactor;
float mergeDirection;
bool bMerge;
Renderer * renderer;
Actor * moveActor;
Actor * targetActor;
bool bInterpolateVectors;
bool bInterpolateMatrix;
bool bInterpolateProperty;
bool bInterpolateActor;
bool bRelative;
bool bAdditive;
bool bLinear;
bool bLooping;
bool bFinished;
vector <key*> keyFrames;
Vector3f baseLocation;
Vector3f baseRotation;
Matrix4f baseMatrix;
std::map<std::string, Matrix4f> baseBoneMatrices;
int currentKey;
double currentTime;
double startTime;
float inPoint;
float timeScale;
float moveTime;
InterpolationHelper();
virtual ~InterpolationHelper();
virtual void interpolate();
virtual void interpolateVectors();
virtual void interpolateMatrix();
virtual void interpolateActor();
virtual void reset();
virtual void fadeOut(int key);
virtual Matrix3f getRotationMatrix(Matrix4f source);
virtual Matrix3f normalizeRotations(Matrix3f source);
};
#endif