-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathModel.h
More file actions
64 lines (34 loc) · 838 Bytes
/
Copy pathModel.h
File metadata and controls
64 lines (34 loc) · 838 Bytes
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
#pragma once
#include "Headers.h"
#include "DataTypes.h"
#include "Helpers.h"
#include "Strings.h"
extern ComPtr<ID3D11Device> gDevice;
extern ComPtr<ID3D11DeviceContext> gContext;
//extern Data gDat;
extern ComPtr<ID3D11Buffer> gcbPerMesh;
class Model{
public:
Model();
void AssignResources(int texID, int vsID, int psID);
void MoveBy(XMFLOAT3 moveBy);
void MoveTo(XMFLOAT3 moveTo);
void LoadMesh(std::wstring fN);
void Draw();
void DrawAt(XMFLOAT3 toDrawAt);
void Update();
void Hide();
void Unhide();
ResourceIDs m_rIds;
private:
void SetResources();
ComPtr<ID3D11Buffer> m_vertexBuffer;
ComPtr<ID3D11Buffer> m_indexBuffer;
int indexCount;
float time = 0.0f;
XMFLOAT3 m_position;
XMFLOAT3 m_velocity;
int numOfVertices;
int numOfIndices;
bool m_isVisible = 1;
};