OROCHI
 
Loading...
Searching...
No Matches
GxToolBackgroundCollisionSet.h
Go to the documentation of this file.
1//===========================================================================
9//===========================================================================
10#pragma once
11
12#if GX_EDITOR
13
15
16//===========================================================================
18//===========================================================================
19class GxToolBackGroundCollisionSet : public GxToolResourceEditBase
20{
21 //-----------------------------------------------------------
23 //-----------------------------------------------------------
25public:
26 // RTTI定義
27 GX_RTTI_CLASS_NAME_ICON(GxToolBackGroundCollisionSet, GxToolResourceEditBase, "背景コリジョン編集", GxRtti::ICON_TYPE::PHYSICS)
28 GX_PROHIBIT_CLASS_BASE_REFERENCE( GxToolBackGroundCollisionSet );
29
30private:
32 static constexpr u32 OFFSET_HITFLAG_LIST = 575;
34 static constexpr u32 OFFSET_FILE_PATH = 100;
36 static constexpr u32 OFFSET_BUTTON_PANEL = 70;
38 static constexpr u32 OFFSET_FILTER_PANEL = 160;
39
41 static constexpr u32 MATERIAL_PRESET_NAME_MAX_COUNT = GxMath::VALUE_512;
42
43private:
44 class GxGuiFormControl;
45 class GxGuiPropertyTableHitFlag;
46
48 //-----------------------------------------------------------
50 //-----------------------------------------------------------
52public:
54 GxToolBackGroundCollisionSet(void);
56 void cleanup(void) override;
58 b32 initialize( void ) override;
59
61 //-----------------------------------------------------------
63 //-----------------------------------------------------------
65private:
67 void save(void) override;
68
70 void setResource(GxResBase* pRes) override;
71
73 void setResourceModel( GxResModel* pResModel );
74
76 void setResourceCollisionMesh( GxResCollisionMesh* pResCollisionMesh );
77
79 void setResourceHitFlagPreset( GxResHitFlagPreset* pResHitFlagPreset );
80
82 void setResourceBackgroundCollisionSetXml( GxResBackgroundCollisionSetXml* pResBackgroundCollisionSetXml );
83
84public:
86 void onCreate(void) override;
87
89 void update(void) override;
90
92 void createMaterialToHitFlagPresetData(void);
93
95 void checkMaterialNameForBackgroundCollisionSetData(void);
96
97private:
99 void createUnitModel(void);
100
102 b32 createGuiFilePath(void);
103
105 void createGuiBackgroundHitFlagTable(void);
106
108 void eventButtonCreateBackgroundHitFlagSetting(void);
109
111 void createBackgroundHitFlagSettingResource(void);
112
114 void updateMaterialNameListForPresetTable(void);
115
117 void updateAttributeList(void);
118
120 //-----------------------------------------------------------
122 //-----------------------------------------------------------
124public:
126 constexpr void getPropertyResModel(void* const pValue) { *static_cast<GxResModel**>(pValue) = _pResModel; }
127
129 void setPropertyResModel(const void* const pValue);
130
132 constexpr void getPropertyGxResCollisionMesh(void* const pValue) { *static_cast<GxResCollisionMesh**>(pValue) = _pResCollisionMesh; }
133
135 void setPropertyGxResCollisionMesh(const void* const pValue);
136
138 constexpr void getPropertyGxResBackgroundCollisionHitFlag(void* const pValue) { *static_cast<GxResHitFlagPreset**>(pValue) = _pResHitFlagPreset; }
139
141 void setPropertyGxResBackgroundCollisionHitFlag(const void* const pValue);
142
144 constexpr void getPropertyResBackgroundCollisionSetXml(void* const pValue) { *static_cast<GxResBackgroundCollisionSetXml**>(pValue) = _pResBackgroundCollisionSetXml; }
145
147 void setPropertyResBackgroundCollisionSetXml(const void* const pValue);
148
150 constexpr GxUnitBackgroundBase* getModel(void) const { return _pUnitModel; }
151
153 constexpr GxResBackgroundCollisionSetXml* getResBackgroundCollisionSetXml(void) const { return _pResBackgroundCollisionSetXml; }
154
156 constexpr u32 getPresetNameCount(void) const {return _presetNameCount;}
157
159 constexpr GxResCollisionMesh* getResCollisionMesh(void) const { return _pResCollisionMesh; }
160
162 constexpr GxResHitFlagPreset* getResHitFlagPreset(void) const { return _pResHitFlagPreset; }
163
165 constexpr void setAttributeCount(u32 size) { _attributeCount = size; }
166
168 //-----------------------------------------------------------
170 //-----------------------------------------------------------
172private:
173 GxResModel* _pResModel;
174 GxUnitBackgroundBase* _pUnitModel;
175 GxResCollisionMesh* _pResCollisionMesh;
176 GxResHitFlagPreset* _pResHitFlagPreset;
177 GxResBackgroundCollisionSetXml* _pResBackgroundCollisionSetXml;
178 GX_ENUM _hitFlagPresetEnum[MATERIAL_PRESET_NAME_MAX_COUNT];
179 u32 _presetNameCount;
180 GxString _interpolationDialogPath;
181 gx::core::GxGuiSplitter* _pSplitterFile;
182 GxGuiPropertyTableHitFlag* _pBgHitFlagTable;
183
184protected:
185 GX_ENUM _pAttributeEnum[MATERIAL_PRESET_NAME_MAX_COUNT];
186 u32 _attributeCount;
187
189};
190
191//===========================================================================
193//===========================================================================
194class GxToolBackGroundCollisionSet::GxGuiPropertyTableHitFlag : public gx::core::GxGuiPropertyTable
195{
196 //-----------------------------------------------------------
198 //-----------------------------------------------------------
200public:
201 GX_RTTI_CLASS( GxToolBackGroundCollisionSet::GxGuiPropertyTableHitFlag, gx::core::GxGuiPropertyTable );
202 // GxClassBaseReference継承クラス用禁止宣言
203 GX_PROHIBIT_CLASS_BASE_REFERENCE(GxGuiPropertyTableHitFlag);
204
206 //-----------------------------------------------------------
208 //-----------------------------------------------------------
210private:
212 GxGuiPropertyTableHitFlag( void ){}
213public:
215 GxGuiPropertyTableHitFlag( GxToolBackGroundCollisionSet* pTool, const GxProperty& property, GxTypedObject* pObject, u32 index = 0, b32 useFilter = false, TYPE type = TYPE::HORIZON );
216
218 //-----------------------------------------------------------
220 //-----------------------------------------------------------
222public:
224 GX_FORCE_INLINE b32 isChange( void ){ return updateObjectList(); }
225
227 GX_FORCE_INLINE b32 isRequestRemake(void) const { return _isRequestRemake; }
228
230 GX_FORCE_INLINE void setRequestRemake( b32 request ) { _isRequestRemake = request; }
231
233 constexpr GxResBackgroundCollisionSet::GxBackgroundCollisionSetData* getEditObject(void) const { return _pSelectObject; }
234
236 constexpr s32 getSelectMaterialNumber(void) { return _pSelectObject ? static_cast<s32>(_pSelectObject->getMaterialNumber()) : -1; }
237
239 constexpr s32 getSelectPresetNumber(void) const { return _pSelectObject ? static_cast<s32>(_pSelectObject->getPresetNumber()) : -1; }
240
242 //-----------------------------------------------------------
244 //-----------------------------------------------------------
246public:
248 constexpr void resetRequestRemake(void) { _isRequestRemake = false; }
249private:
251 void onClick( const GxPoint2& position, u32 button ) override;
252
254 //-----------------------------------------------------------
256 //-----------------------------------------------------------
258private:
260 b32 _isRequestRemake;
261
263};
264
265GX_PHYSICS_NAMESPACE_END()
266#endif // GX_EDITOR
#define GX_PROHIBIT_CLASS_BASE_REFERENCE(__CLASS__)
GxClassBaseReference継承の禁止宣言(new以外の生成禁止 + コピー禁止)
Definition GxBase.h:244
void GxTypedObject
その他
Definition GxDefine.h:213
#define GX_PHYSICS_NAMESPACE_BEGIN()
ネームスペースマクロ
Definition GxPhysics.h:28
static constexpr u32 VALUE_512
512
Definition GxMath.h:128
プロパティクラス
Definition GxProperty.h:48
ヒットフラグ設定データクラス
Definition GxResBackgroundCollisionSet.h:136
リソース基底クラス
Definition GxResBase.h:23
メッシュコリジョンリソースクラス
Definition GxResCollisionMesh.h:19
ヒットフラグのプリセットリソースクラス
Definition GxResHitFlagPreset.h:18
モデルリソースクラス
Definition GxResModel.h:20
背景ユニット基底クラス
Definition GxUnitBackgroundBase.h:20
GUI用
Definition GxDefine.h:194
座標
Definition GxStruct.h:867
文字列型クラス
Definition GxString.h:18
32bitブーリアン
Definition GxDefine.h:173