-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCamera.h
More file actions
63 lines (44 loc) · 1.32 KB
/
Camera.h
File metadata and controls
63 lines (44 loc) · 1.32 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
59
60
61
62
63
#pragma once
#include"OBJFVLib.h"
#include<Windows.h>
#include<commctrl.h>
#include<tchar.h>
#include<d3d12.h>
#include<iostream>
#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 Camera {
public:
Camera();
void Init(int w, int h, Microsoft::WRL::ComPtr<ID3D12Device> dev, Microsoft::WRL::ComPtr<ID3D12GraphicsCommandList> cmdList);
void Update();
~Camera();
HRESULT CreateCameraBuffer();
HRESULT CreateCameraView();
Transform _transform;
SceneData _sceneData;
XMFLOAT3 _background = { 0.0f, 0.5f, 0.5f };
bool _isHorizontal;
float _fov = 90.0f;
XMFLOAT2 _clippingPlanes = { 0.1f, 1000.0f };
Microsoft::WRL::ComPtr<ID3D12DescriptorHeap> _basicHeap = nullptr;
private:
int _mainWindow_width;
int _mainWindow_height;
Microsoft::WRL::ComPtr<ID3D12Resource> _constBuffer = nullptr; // 変換行列を格納するバッファ
Microsoft::WRL::ComPtr<ID3D12Device> _dev = nullptr;
Microsoft::WRL::ComPtr<ID3D12GraphicsCommandList> _cmdList = nullptr;
SceneData* _sceneMap = nullptr; // マップされた_constBufferへのアドレスを保持
};