EHS
Loading...
Searching...
No Matches
KeyFrame.h
Go to the documentation of this file.
1#pragma once
2
3#include "ehs/EHS.h"
4#include "ehs/Array.h"
5#include "ehs/Vec3.h"
6#include "ehs/Quat.h"
7#include "ehs/Mat4.h"
8#include "PropertyChange.h"
9
10namespace ehs
11{
12 class EHS_LIB_IO KeyFrame
13 {
14 private:
15 float num;
16 float timeStamp;
17 Vec3_f pos;
18 Quat_f rot;
19 Vec3_f scale;
20 Mat4_f trans;
21
22 public:
23 KeyFrame();
24
25 KeyFrame(const float num, const float timeStamp, const Vec3_f& pos, const Quat_f& rot, const Vec3_f& scale);
26
27 KeyFrame(const float num, const float timeStamp);
28
29 KeyFrame(const KeyFrame& kf);
30
31 KeyFrame& operator=(const KeyFrame& kf);
32
33 float GetNum() const;
34
35 float GetTimeStamp() const;
36
37 void SetPos(const Vec3_f& newPos);
38
39 Vec3_f GetPos() const;
40
41 void SetRot(const Quat_f& newRot);
42
43 Quat_f GetRot() const;
44
45 void SetScale(const Vec3_f& newScale);
46
47 Vec3_f GetScale() const;
48
49 void CalculateTransform();
50
51 Mat4_f GetTrans() const;
52
53 static Mat4_f Interpolate(const KeyFrame& prev, const KeyFrame& next, const float percentage);
54 };
55}
void SetScale(const Vec3_f &newScale)
Definition KeyFrame.cpp:73
void CalculateTransform()
Definition KeyFrame.cpp:83
Vec3_f GetScale() const
Definition KeyFrame.cpp:78
float GetNum() const
Definition KeyFrame.cpp:43
static Mat4_f Interpolate(const KeyFrame &prev, const KeyFrame &next, const float percentage)
Definition KeyFrame.cpp:93
float GetTimeStamp() const
Definition KeyFrame.cpp:48
void SetPos(const Vec3_f &newPos)
Definition KeyFrame.cpp:53
KeyFrame & operator=(const KeyFrame &kf)
Definition KeyFrame.cpp:28
KeyFrame()
Definition KeyFrame.cpp:7
void SetRot(const Quat_f &newRot)
Definition KeyFrame.cpp:63
Mat4_f GetTrans() const
Definition KeyFrame.cpp:88
Vec3_f GetPos() const
Definition KeyFrame.cpp:58
Quat_f GetRot() const
Definition KeyFrame.cpp:68
Definition Anchor.h:6
Vec3< float > Vec3_f
Definition Vec3.h:443
Mat4< float > Mat4_f
Definition Mat4.h:427
Quat< float > Quat_f
Definition Quat.h:395