-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathGltfModelComponent.h
More file actions
51 lines (36 loc) · 1.13 KB
/
GltfModelComponent.h
File metadata and controls
51 lines (36 loc) · 1.13 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
#pragma once
#include"GltfModel.h"
#include"IComponent.h"
#include"GpuBufferFactory.h"
#include"DescriptorSetFactory.h"
class GltfModelComponent : public IComponent
{
private:
//バッファの作成
std::shared_ptr<GpuBufferFactory> bufferFactory;
//ディスクリプタセットレイアウトの作成
std::shared_ptr<GpuDescriptorSetLayoutFactory> layoutFactory;
//ディスクリプタセットの作成
std::shared_ptr<DescriptorSet> descriptorSetFactory;
//Gltfモデルのデータ
std::shared_ptr<GltfModel> gltfModel;
public:
GltfModelComponent(std::shared_ptr<GpuBufferFactory> buffer
, std::shared_ptr<GpuDescriptorSetLayoutFactory> layout
, std::shared_ptr<DescriptorSet> desc
, std::shared_ptr<GltfModel> model);
//Gltfモデルを返す
std::shared_ptr<GltfModel> getGltfModel() { return gltfModel; }
//3Dモデルの中心を求める
glm::vec3 getCenter();
//コンポーネントをアタッチした時点で実行
void OnAwake() override;
//アタッチ後の次のフレーム開始時点で実行
void OnStart() override {};
//更新フェーズで実行
void OnUpdate() override {};
//更新フェーズ後に実行
void OnLateUpdate() override {};
//フレーム終了時に実行
void OnFrameEnd() override {};
};