14GX_MOTION_NAMESPACE_BEGIN()
19class GxToolMotionViewer : public GxToolResourceEditBase
32 static constexpr u32 OFFSET_CENTER = 255;
34 static constexpr u32 OFFSET_FILE_PATH = 70;
36 static constexpr u32 OFFSET_MOTION_NAME = 170;
38 class UnitForMotionViewer;
39 class GxGuiFormControl;
40 class GxGuiPropertyTableMotionSyncParam;
41 class GxGuiPropertyTableChildUnitParam;
42 class GxGuiPropertyTableMotionPlayParam;
51 GxToolMotionViewer(
void);
53 void cleanup(
void)
override;
55 b32 initialize(
void )
override;
64 void convert(
void )
override;
66 void setResource(
GxResBase* pRes)
override;
70 void setResourceModel(
GxResModel* pResModel );
74 void setResourceMotionInterpolationSettings( GxResMotionInterpolationSettingsXml* pResInterpolation );
83 constexpr void getPropertyParentResModel(
void*
const pValue) { *
static_cast<GxResModel**
>(pValue) = _pParentResModel; }
85 void setPropertyParentResModel(
const void*
const pValue);
87 constexpr void getPropertyParentResMotionPackage(
void*
const pValue) { *
static_cast<GxResMotionPackage**
>(pValue) = _pParentResMotionPackage; }
89 void setPropertyParentResMotionPackage(
const void*
const pValue);
91 constexpr void getPropertyParentResMotionInterpolation(
void*
const pValue) { *
static_cast<GxResMotionInterpolationSettingsXml**
>(pValue) = _pParentResMotionInterpolation; }
93 void setPropertyParentResMotionInterpolation(
const void*
const pValue);
95 void getPropertyInterpolateXTranslate(
const void* pValue);
97 void getPropertyInterpolateYTranslate(
const void* pValue);
99 void getPropertyInterpolateZTranslate(
const void* pValue);
101 void getPropertyInterpolatePosition(
const void* pValue);
103 void getPropertyInterpolateRotate(
const void* pValue);
105 void getPropertyInterpolateScale(
const void* pValue);
107 void getPropertyInterpolateLoop(
const void* pValue);
109 void setPropertyInterpolateXTranslate(
const void* pValue);
111 void setPropertyInterpolateYTranslate(
const void* pValue);
113 void setPropertyInterpolateZTranslate(
const void* pValue);
115 void setPropertyInterpolatePosition(
const void* pValue);
117 void setPropertyInterpolateRotate(
const void* pValue);
119 void setPropertyInterpolateScale(
const void* pValue);
121 void setPropertyInterpolateLoop(
const void* pValue);
130 void onCreate(
void)
override;
132 void onReload (GxGuiBase* pReloadGui,
GxResBase* pReloadRes)
override;
134 void update(
void)
override;
140 void createMotionSyncParamTable(u32 category);
142 void deleteMotionSyncParamTable(u32 category);
144 void createChildUnitParamTable(
void);
146 void createMotionPlayParamTable(
void);
148 constexpr s32 getSelectIdFromTabGui(
void)
const {
if( _pTab ){
return _pTab->getCurrentIndex() - 1; }
return -1;}
153 b32 createGuiFilePath(
void );
156 void createParentUnit(
void);
158 void updateParentMotion(
void);
160 constexpr UnitForMotionViewer* getParentUnit(
void)
const {
return _pParentUnit; }
162 GX_FORCE_INLINE GxMotionNamesList* getParentMotionNamesList(
void){
return &_parentMotionNamesList; }
166 void createChildUnit(
void );
168 void deleteChildUnit(u32 deleteObjectIndex);
170 void updateChildUnitResource(
void);
172 void updateChildUnitMotion(
void);
174 constexpr UnitForMotionViewer* getChildUnit(u32 index)
const {
return _pChildUnit[index]; }
176 GX_FORCE_INLINE GxMotionNamesList* getChildMotionNamesList(u32 index) {
return &_childMotionNamesList[index]; }
184 UnitForMotionViewer* _pParentUnit;
187 GxResMotionInterpolationSettingsXml* _pParentResMotionInterpolation;
188 gx::motion::GxMotionNamesList _parentMotionNamesList;
189 GxResMotionViewerXml::MotionPlayCategory::PlayParam* _pUsePlayParam;
190 UnitForMotionViewer* _pChildUnit[GxResMotionViewer::CHILD_UNIT_MAX_COUNT];
191 gx::motion::GxMotionNamesList _childMotionNamesList[GxResMotionViewer::CHILD_UNIT_MAX_COUNT];
192 gx::core::GxGuiSplitter* _pSplitterMain;
193 gx::core::GxGuiSplitter* _pSplitterRight;
194 gx::core::GxGuiSplitter* _pSplitterLeft;
196 GxString _tabTitle[GxResMotionViewer::CHILD_UNIT_MAX_COUNT];
197 GxGuiFormControl* _pFormControl;
198 GxGuiPropertyTableMotionSyncParam* _pMotionSyncParamTable;
199 GxGuiPropertyTableChildUnitParam* _pChildUnitParamTable;
200 GxGuiPropertyTableMotionPlayParam* _pMotionPlayParamTable;
208class GxToolMotionViewer::UnitForMotionViewer :
public GxUnitMotion
216 GX_RTTI_CLASS_NAME(UnitForMotionViewer,
GxUnitMotion,
"プレビュー用ユニット")
225 UnitForMotionViewer(
void);
233class GxToolMotionViewer::GxGuiFormControl : public GxGuiForm
241 GX_RTTI_CLASS(GxToolMotionViewer::GxGuiFormControl, GxGuiForm)
255 GxGuiFormControl(GxToolMotionViewer* pRoot =
nullptr);
257 b32 initialize(
void )
override;
266 void pushButtonPlay(
void);
272 void addFrame(f32 addFrame);
274 void pushButtonTop(
void);
276 void pushButtonBottom(
void);
278 void pushButtonBack(
void);
280 void pushButtonForward(
void);
282 void pushButtonShortcutAdd(
void);
284 void pushButtonShortcutDelete(
void);
293 constexpr UnitForMotionViewer* getParentUnit(
void)
const {
if(!_pRoot){
return nullptr; }
return _pRoot->getParentUnit(); }
295 constexpr f32 getMotionSpeed(
void)
const {
return _motionSpeed; }
297 GX_FORCE_INLINE
b32 isPlay(
void)
const {
return _isMotionPlaying; }
299 GX_FORCE_INLINE
b32 isInterpolation(
void)
const {
return _isInterpolation; }
301 GX_FORCE_INLINE
b32 isApplyInterpolationFlag(
void)
const {
return _isApplyInterpolationFlag; }
309 GxToolMotionViewer* _pRoot;
310 GxGuiButton* _pButtonPlay;
312 u32 _motionPlayCount;
313 b32 _isMotionPlaying;
314 b32 _isInterpolation;
315 b32 _isApplyInterpolationFlag;
323class GxToolMotionViewer::GxGuiPropertyTableMotionSyncParam :
public gx::core::GxGuiPropertyTable
330 GX_RTTI_CLASS( GxToolMotionViewer::GxGuiPropertyTableMotionSyncParam, gx::core::GxGuiPropertyTable );
341 GxGuiPropertyTableMotionSyncParam(
void ){}
344 GxGuiPropertyTableMotionSyncParam( GxToolMotionViewer* pTool,
const GxProperty& property,
GxTypedObject* pObject, u32 index = 0,
b32 useFilter =
false, TYPE type = TYPE::HORIZON );
353 void onClick(
const GxPoint2& pos,u32 button )
override;
355 void createPopUpMenu(
const GxPoint2& position);
357 void eventDeleteMotionSyncParam(
void);
359 void eventCreateMotionSyncParam(
void);
367 GxToolMotionViewer* _pRoot;
368 GxResMotionViewer::MotionSyncCategory::MotionSyncParam* _pSelectObject;
376class GxToolMotionViewer::GxGuiPropertyTableChildUnitParam :
public gx::core::GxGuiPropertyTable
383 GX_RTTI_CLASS( GxToolMotionViewer::GxGuiPropertyTableChildUnitParam, gx::core::GxGuiPropertyTable );
394 GxGuiPropertyTableChildUnitParam(
void ){}
397 GxGuiPropertyTableChildUnitParam( GxToolMotionViewer* pTool,
const GxProperty& property,
GxTypedObject* pObject, u32 index = 0,
b32 useFilter =
false, TYPE type = TYPE::HORIZON );
406 void onClick(
const GxPoint2& pos,u32 button )
override;
408 void createPopUpMenu(
const GxPoint2& position);
410 void eventDeleteChildUnitParam(
void);
412 void eventCreateChildUnitParam(
void);
420 GxToolMotionViewer* _pRoot;
421 GxResMotionViewer::MotionChildCategory::ChildUnitParam* _pSelectObject;
429class GxToolMotionViewer::GxGuiPropertyTableMotionPlayParam :
public gx::core::GxGuiPropertyTable
436 GX_RTTI_CLASS( GxToolMotionViewer::GxGuiPropertyTableMotionPlayParam, gx::core::GxGuiPropertyTable );
447 GxGuiPropertyTableMotionPlayParam(
void ){}
450 GxGuiPropertyTableMotionPlayParam( GxToolMotionViewer* pTool,
const GxProperty& property,
GxTypedObject* pObject, u32 index = 0,
b32 useFilter =
false, TYPE type = TYPE::HORIZON );
459 void onClick(
const GxPoint2& pos,u32 button )
override;
461 void createPopUpMenu(
const GxPoint2& position);
463 void eventDeleteMotionPlayParam(
void);
465 void eventCreateMotionPlayParam(
void);
473 GxToolMotionViewer* _pRoot;
478GX_MOTION_NAMESPACE_END()
#define GX_PROHIBIT_CLASS_BASE_REFERENCE(__CLASS__)
GxClassBaseReference継承の禁止宣言(new以外の生成禁止 + コピー禁止)
Definition GxBase.h:244
T gx_cast(GxClassBaseRoot *pObject)
Definition GxBase.h:264
void GxTypedObject
その他
Definition GxDefine.h:213
static constexpr u32 VALUE_16
16
Definition GxMath.h:123
プロパティクラス
Definition GxProperty.h:48
プロパティテーブルクラス
Definition GxProperty.h:1641
リソース基底クラス
Definition GxResBase.h:23
モデルリソースクラス
Definition GxResModel.h:20
モーションパッケージリソース
Definition GxResMotionPackage.h:20
実行時型情報クラス
Definition GxRtti.h:154
モーションユニット
Definition GxUnitMotion.h:20
座標
Definition GxStruct.h:867
文字列型クラス
Definition GxString.h:18
32bitブーリアン
Definition GxDefine.h:173