-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSubModel.h
More file actions
58 lines (45 loc) · 1.31 KB
/
SubModel.h
File metadata and controls
58 lines (45 loc) · 1.31 KB
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
#pragma once
#include"OBJFVLib.h"
#include<Windows.h>
#include<tchar.h>
#include<d3d12.h>
#include<dxgi1_6.h>
#include<DirectXMath.h>
#include<vector>
#include<map>
#include<d3dcompiler.h>
#include<DirectXTex.h>
#include<d3dx12.h>
#include<wrl.h>
#pragma comment(lib,"DirectXTex.lib")
#pragma comment(lib,"d3d12.lib")
#pragma comment(lib,"dxgi.lib")
#pragma comment(lib,"d3dcompiler.lib")
using namespace std;
using namespace DirectX;
class SubModel {
public:
string _materialName = "";
Transform _transform;
SRTMatrices* _srt;
Material _material;
Material* _pMaterial = &_material;
string _textureFileName = "";
Microsoft::WRL::ComPtr<ID3D12DescriptorHeap> _heap = nullptr;
D3D12_DESCRIPTOR_HEAP_DESC _subModelDescHeapDesc = {};
Microsoft::WRL::ComPtr<ID3D12Resource> _basicBuffer = nullptr; // モデルの座標、回転、拡大を保持
Microsoft::WRL::ComPtr<ID3D12Resource> _materialBuffer = nullptr;
D3D12_CONSTANT_BUFFER_VIEW_DESC _cbvDesc = {};
vector<unsigned int> _vertexIndices;
Microsoft::WRL::ComPtr<ID3D12Resource> _indexBuffer = nullptr;
D3D12_INDEX_BUFFER_VIEW _indexBufferView = {};
string _textureName;
TexMetadata _metadata = {};
ScratchImage _scratchImage = {};
Microsoft::WRL::ComPtr<ID3D12Resource> _textureBuffer = nullptr;
string _materialID;
public:
void Update();
SubModel();
~SubModel();
};