OROCHI
 
Loading...
Searching...
No Matches
GxResSoftbodySimulationReplay.h
Go to the documentation of this file.
1//===========================================================================
10//===========================================================================
11#pragma once
12
13GX_UTILITY_NAMESPACE_BEGIN()
14
15#if SOFTBODY_USE_REPLAY
16//===========================================================================
18//===========================================================================
19class GxResSoftbodySimulationReplay : public GxResBase
20{
21 //-----------------------------------------------------------
23 //-----------------------------------------------------------
25public:
26 // RTTI宣言
27 GX_RTTI_RESOURCE(GxResSoftbodySimulationReplay, GxResBase);
28 // GxClassBaseReference継承クラス用禁止宣言
29 GX_PROHIBIT_CLASS_BASE_REFERENCE(GxResSoftbodySimulationReplay);
30
32
37 class GxJointIndex : public gx::core::GxClassBase
38 {
39 //-----------------------------------------------------------
41 //-----------------------------------------------------------
43 public:
44 // RTTI宣言
45 GX_RTTI_CLASS( GxJointIndex, GxClassBase );
46
48 //-----------------------------------------------------------
50 //-----------------------------------------------------------
52
54 GxJointIndex(void) : _jointIndex(0) {}
56 GxJointIndex(u32 i) : _jointIndex(i) {}
57
59 //-----------------------------------------------------------
61 //-----------------------------------------------------------
63
64 u32 _jointIndex;
65
67 };
68
70
74 class GxJointQuaternion : public gx::core::GxClassBase
75 {
76 //-----------------------------------------------------------
78 //-----------------------------------------------------------
80 public:
81 // RTTI宣言
82 GX_RTTI_CLASS( GxJointQuaternion, GxClassBase );
83
85 //-----------------------------------------------------------
87 //-----------------------------------------------------------
89
91 GxJointQuaternion(void) : _jointQuaternion( GxQuaternion::IDENTITY ) {}
93 GxJointQuaternion(const GxQuaternion& quaternion) : _jointQuaternion( quaternion ) {}
94
96 //-----------------------------------------------------------
98 //-----------------------------------------------------------
100
101 GxQuaternion _jointQuaternion;
102
104 };
105
107 //-----------------------------------------------------------
109 //-----------------------------------------------------------
111
113 GxResSoftbodySimulationReplay(void);
114
116 //-----------------------------------------------------------
118 //-----------------------------------------------------------
120protected:
122 b32 load(GxStream& in, u32 dataSize);
123#if GX_DEVELOP
125 b32 save(GxStream& out);
126#endif // GX_DEVELOP
127
129 //-----------------------------------------------------------
131 //-----------------------------------------------------------
133public:
135 constexpr u32 getFrameCount(void) const { return _frameCount; }
137 constexpr void setFrameCount(u32 count) { _frameCount = count; }
138
140 constexpr u32 getJointIndexCount(void) const { return _jointIndexArray.getCount(); }
142 u32 getJointIndex(u32 index);
144 GX_FORCE_INLINE GxArrayClassBase& getJointIndexArray(void) { return _jointIndexArray; }
145
147 constexpr u32 getJointQuaternionCount(void) const { return _jointQuaternionArray.getCount(); }
149 GxQuaternion getJointQuaternion(u32 index);
151 GX_FORCE_INLINE GxArrayClassBase& getJointQuaternionArray(void) { return _jointQuaternionArray; }
152
154 //-----------------------------------------------------------
156 //-----------------------------------------------------------
158protected:
159 u32 _frameCount;
160 GxArrayClassBase _jointIndexArray;
161 GxArrayClassBase _jointQuaternionArray;
162
164};
165
166//===========================================================================
168//===========================================================================
169class GxResSoftbodySimulationReplayXml : public GxResSoftbodySimulationReplay
170{
171 //-----------------------------------------------------------
173 //-----------------------------------------------------------
175public:
176 // RTTI 宣言
177 GX_RTTI_RESOURCE(GxResSoftbodySimulationReplayXml, GxResSoftbodySimulationReplay);
178 // GxClassBaseReference 継承クラス用禁止宣言
179 GX_PROHIBIT_CLASS_BASE_REFERENCE(GxResSoftbodySimulationReplayXml);
180
182 //-----------------------------------------------------------
184 //-----------------------------------------------------------
186
188 GxResSoftbodySimulationReplayXml(void);
189
191 //-----------------------------------------------------------
193 //-----------------------------------------------------------
195
197 void cleanup(void) override;
199 b32 finalized(void);
200
201protected:
203 b32 load(GxStream & in, u32 dataSize);
205 b32 save(GxStream & out);
206
208};
209
210#endif // SOFTBODY_USE_REPLAY
211
212GX_UTILITY_NAMESPACE_END()
#define GX_PROHIBIT_CLASS_BASE_REFERENCE(__CLASS__)
GxClassBaseReference継承の禁止宣言(new以外の生成禁止 + コピー禁止)
Definition GxBase.h:244
@ IDENTITY
基礎値で初期化
#define GX_RTTI_RESOURCE(__THIS__, __BASE__)
リソースクラス型情報宣言
Definition GxRttiResource.h:102
配列クラス
Definition GxArrayClassBase.h:18
constexpr u32 getCount(void) const
配列数を取得
Definition GxArrayClassBase.h:109
オブジェクト基底クラス
Definition GxBase.h:88
リソース基底クラス
Definition GxResBase.h:23
b32 load(GxStream &stream, u32 size)
ロード
Definition GxResBase.h:394
ストリーム基礎クラス
Definition GxStream.h:20
クォータニオン
Definition GxQuaternion.h:19
32bitブーリアン
Definition GxDefine.h:173