forked from megayuchi/D3D12Lecture
-
Notifications
You must be signed in to change notification settings - Fork 0
/
GameObject.h
39 lines (32 loc) · 784 Bytes
/
GameObject.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
#pragma once
#include "../Util/LinkedList.h"
class CGame;
class CD3D12Renderer;
class CGameObject
{
CGame* m_pGame = nullptr;
CD3D12Renderer* m_pRenderer = nullptr;
void* m_pMeshObj = nullptr;
XMVECTOR m_Scale = {1.0f, 1.0f, 1.0f, 0.0f};
XMVECTOR m_Pos = {};
float m_fRotY = 0.0f;
XMMATRIX m_matScale = {};
XMMATRIX m_matRot = {};
XMMATRIX m_matTrans = {};
XMMATRIX m_matWorld = {};
BOOL m_bUpdateTransform = FALSE;
void* CreateBoxMeshObject();
void* CreateQuadMesh();
void UpdateTransform();
void Cleanup();
public:
SORT_LINK m_LinkInGame;
BOOL Initialize(CGame* pGame);
void SetPosition(float x, float y, float z);
void SetScale(float x, float y, float z);
void SetRotationY(float fRotY);
void Run();
void Render();
CGameObject();
~CGameObject();
};