Project

General

Profile

SO3Engine
ALKeyFrame.h
Go to the documentation of this file.
1#ifndef ALKEYFRAME_H
2#define ALKEYFRAME_H
3
4#include "ALSceneLoader.h"
5
6namespace SO3
7{
9 {
10 public:
11 ALKeyFrame(double time);
13
14 bool hasPosition();
15 bool hasScale();
16 bool hasRotation();
17
18 void setPosition(aiVectorKey positionkey);
19 void setScale(aiVectorKey scaleKey);
20 void setRotation(aiQuatKey rotationKey);
21
22 double getTime();
23 aiVectorKey getPosition();
24 aiVectorKey getScale();
25 aiQuatKey getRotation();
26
27 void createInterpolation(std::vector<ALKeyFrame> keyframes, aiNode* initNode);
28
29 private:
30 template<typename T> T linearInterpolate(T at, T xa, T ya, T xb, T yb);
31
32 double mTime;
33
34 aiVectorKey mPosition;
35 bool mHasPos;
36
37 aiVectorKey mScale;
38 bool mHasScl;
39
40 aiQuatKey mRotation;
41 bool mHasRot;
42 };
43};
44
45#endif // ALKEYFRAME_H
void createInterpolation(std::vector< ALKeyFrame > keyframes, aiNode *initNode)
void setRotation(aiQuatKey rotationKey)
aiQuatKey getRotation()
void setPosition(aiVectorKey positionkey)
aiVectorKey getPosition()
void setScale(aiVectorKey scaleKey)
aiVectorKey getScale()