OROCHI
 
Loading...
Searching...
No Matches
GxResMotionBlend.h
Go to the documentation of this file.
1//===========================================================================
9//===========================================================================
10#pragma once
11
12GX_MOTION_NAMESPACE_BEGIN()
13
14//===========================================================================
16//===========================================================================
18{
19 //-----------------------------------------------------------
21 //-----------------------------------------------------------
23public:
24 // RTTI定義
25 GX_RTTI_RESOURCE_NAME(GxResMotionBlend, GxResBase, "モーションブレンドリソース");
26 // GxClassBaseReference継承クラス用禁止宣言
28
29
30 class BlendParam : public GxClassBase
31 {
32 //-----------------------------------------------------------
34 //-----------------------------------------------------------
36 public:
37 GX_RTTI_CLASS(BlendParam, GxClassBase)
38
39
41 {
42 SYNC_BASE_MOTION = 0x01 << 0,
43 NOT_SYNC_BASE_MOTION = 0x01 << 1,
44 };
45
47 enum class BLEND_TYPE
48 {
49 NORMAL,
50 ADD,
51 MAX,
52 };
53#if GX_DEVELOP
55 GX_ENUM_TABLE_MAX(BLEND_TYPE)
56#endif //GX_DEVELOP
57
59 //-----------------------------------------------------------
61 //-----------------------------------------------------------
63
65 BlendParam(void);
67 void initialize(void);
69 BlendParam& operator= (BlendParam const& other);
70
71#if GX_DEVELOP
73 static GxGuiBase* createGui(GxProperty& property, GxTypedObject* pOwner, const GxRtti& rtti, u32 index = 0);
74#endif //GX_DEVELOP
75
77 //-----------------------------------------------------------
79 //-----------------------------------------------------------
81
82#if GX_DEVELOP
83 static GxMotionNamesList* _pMotionNameList;
84#endif //GX_DEVELOP
93
95 };
96
98 //-----------------------------------------------------------
100 //-----------------------------------------------------------
102public:
104 GxResMotionBlend(void);
106 void cleanup(void) override;
107
109 //-----------------------------------------------------------
111 //-----------------------------------------------------------
113public:
115 b32 load(GxStream& stream, u32 /*dataSize*/);
116#if GX_DEVELOP
118 b32 save(GxStream& stream);
119#endif //GX_DEVELOP
120
122 //-----------------------------------------------------------
124 //-----------------------------------------------------------
126public:
128 constexpr BlendParam* getBlendParam(u32 index) const { return _ppBlendParam[index]; }
130 constexpr u32 getBlendParamMax(void) const { return _blendParamMax; }
132 constexpr u32 getNeedMotionModuleCount(void) const { return _needMotionModuleCount; }
133
134private:
136 void getPropertyBlendParam(void* pValue, u32 index);
138 void setPropertyBlendParam(const void* pValue, u32 index );
140 u32 getPropertyBlendParamCount(void);
142 void setPropertyBlendParamCount(u32 blendParamMax);
143
145 //-----------------------------------------------------------
147 //-----------------------------------------------------------
149protected:
153
155};
156
157#if GX_DEVELOP
158//===========================================================================
160//===========================================================================
161class GxResMotionBlendXml : public GxResMotionBlend
162{
163 //-----------------------------------------------------------
165 //-----------------------------------------------------------
167public:
168 // RTTI定義
169 GX_RTTI_RESOURCE_NAME(GxResMotionBlendXml, GxResMotionBlend, "モーションブレンドXMLリソース");
170 // GxClassBaseReference継承クラス用禁止宣言
171 GX_PROHIBIT_CLASS_BASE_REFERENCE(GxResMotionBlendXml)
172
173
174 //-----------------------------------------------------------
176 //-----------------------------------------------------------
178public:
180 GxResMotionBlendXml(void);
182 void cleanup(void) override;
183
185 //-----------------------------------------------------------
187 //-----------------------------------------------------------
189public:
191 GxResMotionBlend::BlendParam* addBlendParam(void);
193 b32 deleteBlendParam(BlendParam* pDeleteObject);
195 constexpr void setNeedMotionModuleCount(u32 needMotionModuleCount){ _needMotionModuleCount = needMotionModuleCount;}
197 void updatePreviewBlendParam(s32 baseMotionNumber);
198protected:
200 b32 load(GxStream& in, u32 /*dataSize*/);
202 b32 save(GxStream& out);
203
205 //-----------------------------------------------------------
207 //-----------------------------------------------------------
209private:
211 void getPropertyPreviewBlendParam(void* pValue, u32 index);
213 void setPropertyPreviewBlendParam(const void* pValue, u32 index );
215 u32 getPropertyPreviewBlendParamCount(void);
217 void setPropertyPreviewBlendParamCount(u32 blendParamMax);
218
220 //-----------------------------------------------------------
222 //-----------------------------------------------------------
224protected:
225 BlendParam** _ppPreviewBlendParam;
226 u32 _previewBlendParamMax;
227
229};
230
231#endif // GX_DEVELOP
232
233GX_MOTION_NAMESPACE_END()
#define GX_PROHIBIT_CLASS_BASE_REFERENCE(__CLASS__)
GxClassBaseReference継承の禁止宣言(new以外の生成禁止 + コピー禁止)
Definition GxBase.h:244
@ MAX
定義数
void GxTypedObject
その他
Definition GxDefine.h:213
@ NORMAL
法線(VS入力,VS→PS)
@ ADD
加算(src+dst)
オブジェクト基底クラス
Definition GxBase.h:88
プロパティクラス
Definition GxProperty.h:48
リソース基底クラス
Definition GxResBase.h:23
ブレンド用パラメーター
Definition GxResMotionBlend.h:31
BLEND_TYPE _blendType
ブレンドタイプ
Definition GxResMotionBlend.h:91
f32 _targetMotionBlendRate
ターゲットモーションのブレンドレート
Definition GxResMotionBlend.h:87
u32 _jointForPartialBlend
パーシャルブレンド時に使用する関節(0以下はパーシャルブレンドオフ)
Definition GxResMotionBlend.h:90
BLEND_TYPE
ブレンドタイプ
Definition GxResMotionBlend.h:48
s32 _targetMotionNumber
ターゲットモーションナンバー
Definition GxResMotionBlend.h:86
BLEND_MOTION_PLAY_PARAM
ブレンドモーション再生パラメータ
Definition GxResMotionBlend.h:41
u32 _processKind
処理順
Definition GxResMotionBlend.h:92
f32 _targetMotionSpeed
ターゲットモーションのスピード
Definition GxResMotionBlend.h:88
u32 _targetMotionPlayType
ターゲットモーションの再生タイプ
Definition GxResMotionBlend.h:89
s32 _baseMotionNumber
ベースモーションナンバー
Definition GxResMotionBlend.h:85
モーション補間設定リソースクラス
Definition GxResMotionBlend.h:18
void cleanup(void) override
解放
Definition GxResMotionBlend.cpp:142
b32 load(GxStream &stream, u32)
リソース読み込み
Definition GxResMotionBlend.cpp:160
constexpr u32 getBlendParamMax(void) const
ブレンドパラメータ最大数を取得
Definition GxResMotionBlend.h:130
u32 _blendParamMax
ブレンドパラメータ最大数
Definition GxResMotionBlend.h:151
BlendParam ** _ppBlendParam
ブレンドパラメータ
Definition GxResMotionBlend.h:150
u32 _needMotionModuleCount
モーションモジュール必要数
Definition GxResMotionBlend.h:152
constexpr BlendParam * getBlendParam(u32 index) const
ブレンドパラメータを取得
Definition GxResMotionBlend.h:128
constexpr u32 getNeedMotionModuleCount(void) const
必要なモーションモジュール数を取得
Definition GxResMotionBlend.h:132
実行時型情報クラス
Definition GxRtti.h:154
ストリーム基礎クラス
Definition GxStream.h:20
32bitブーリアン
Definition GxDefine.h:173