-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMyDemoApp.h
67 lines (60 loc) · 1.31 KB
/
MyDemoApp.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
#ifndef _MyApp_
#define _MyApp_
#include "Application.h"
#include "DebugDraw.h"
#include <vector>
#include "Pose.h"
#include "Clip.h"
#include "Skeleton.h"
#include "Mesh.h"
#include "Texture.h"
#include "Shader.h"
#include "globals.h"
class MyApp : public Application
{
struct AnimationInstance
{
Pose mAnimatedPose;
std::vector <mat4> mPosePalette;
unsigned int mClip;
float mPlayback;
Transform mModel;
inline AnimationInstance() : mClip(0), mPlayback(0.0f) { }
};
private:
int mouseX;
int mouseY;
public:
void Initialize();
void Update(float deltaTime);
void Render(float inAspectRatio);
void Shutdown();
MyApp() : mouseX(0), mouseY(0) {}
void UpdateMousePosition(int x, int y) // Load Mouse location from winMain
{
mouseX = x;
mouseY = y;
}
void UpdateCamera();
protected:
Texture* mDiffuseTexture;
Texture* TruckDiffuseTexture;
shader* mStaticShader;
shader* mSkinnedShader;
std::vector<Mesh> mGPUMeshes;
std::vector<Mesh> mCPUMeshes;
Transform mModel;
//animation data
Pose mRestPose;
Skeleton mSkeleton;
Pose mCurrentPose;
std::vector<Clip> mClips;
unsigned int mCurrentClip;
float mPlaybackTime;
DebugDraw* mBindPoseVisual;
DebugDraw* mRestPoseVisual;
DebugDraw* mCurrentPoseVisual;
AnimationInstance mGPUAnimInfo;
AnimationInstance mCPUAnimInfo;
};
#endif // !_MyApp_