-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathmodelAnalyzerBehaviorComponent.h
More file actions
111 lines (98 loc) · 3.93 KB
/
modelAnalyzerBehaviorComponent.h
File metadata and controls
111 lines (98 loc) · 3.93 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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
//--------------------------------------------------------------------------------
// モデルアナライザービヘイビアコンポネント
// modelAnalyzerBehaviorComponent.h
// Author : Xu Wenjie
// Date : 2017-07-19
//--------------------------------------------------------------------------------
#pragma once
//--------------------------------------------------------------------------------
// インクルードファイル
//--------------------------------------------------------------------------------
#include "behaviorComponent.h"
#include "KF_UtilityFBX.h"
#include "material.h"
#include "labels.h"
//--------------------------------------------------------------------------------
// 前方宣言
//--------------------------------------------------------------------------------
class CMyNode;
class CAnimator;
//--------------------------------------------------------------------------------
// クラス宣言
//--------------------------------------------------------------------------------
class CModelAnalyzerBehaviorComponent : public CBehaviorComponent
{
public:
//--------------------------------------------------------------------------------
// 関数定義
//--------------------------------------------------------------------------------
CModelAnalyzerBehaviorComponent(CGameObject* const pGameObj);
~CModelAnalyzerBehaviorComponent() {}
bool Init(void) override;
void Uninit(void) override;
void Update(void) override;
void LateUpdate(void) override;
void OnTrigger(CColliderComponent& colliderThis, CColliderComponent& collider) override {}
void OnCollision(CCollisionInfo& collisionInfo) override {}
auto GetRootNode(void) const { return root_node_; }
void ChangeModel(const string& file_path);
void SaveModel(const OutType& type);
const bool& IsRenderSkeletons(void) const { return is_render_skeletons_; }
const bool& IsRenderMeshes(void) const { return is_render_meshes_; }
const bool& IsRenderColliders(void) const { return is_render_colliders_; }
const bool& IsRenderBoundingSphere(void) const { return is_render_bounding_sphere; }
const auto& GetMaterials(void) const { return materials_; }
private:
//--------------------------------------------------------------------------------
// 定数定義
//--------------------------------------------------------------------------------
static constexpr int kBufferSize = 64;
//--------------------------------------------------------------------------------
// 関数定義
//--------------------------------------------------------------------------------
void ReleaseModel(void);
//ImGui
void ShowMainMenuBar(void);
void ShowMainMenuFile(void);
void ShowMainWindow(void);
void ShowModelInfoWindow(void);
CMyNode* ShowNodeInfo(CMyNode* pNode);
void ShowNodeNowWindow(void);
void ShowAnimatorWindow(void);
void ShowCameraWindow(void);
void ShowMaterialWindow(void);
void ShowCurrentAnimationWindow(void);
bool ChangeParent(CMyNode* pNode);
void ChangeTexture(string& meshTexture);
void AddAnimation(void);
//--------------------------------------------------------------------------------
// 変数定義
//--------------------------------------------------------------------------------
bool is_render_skeletons_;
bool is_render_meshes_;
bool is_render_colliders_;
bool is_render_bounding_sphere;
bool is_reserve_texcoordv_;
bool is_saved_;
string file_name_;
CMyNode* root_node_;
CAnimator* animator_;
vector<string> node_names_;
vector<CMyNode*> nodes_;
unordered_map<string, Material> materials_;
//ImGui
float rotation_speed_;
bool is_display_model_window_;
bool is_display_animator_window_;
bool is_display_camera_window_;
bool is_display_material_window_;
CMyNode* current_node_;
CKFVec3 current_node_correct_translation_;
CKFVec3 current_node_correct_rotation_;
CKFVec3 current_node_correct_scale_;
Language current_language_;
//Animator
bool is_playing_motion_;
int current_frame_;
int motion_no_;
};