14#define USBS_DEFAULT_UNIT_PROCESS_NUMBER_SIMULATION (4)
15#define USBS_DEFAULT_UNIT_LIST_NUMBER_SIMULATION (20)
17GX_UTILITY_NAMESPACE_BEGIN()
35#if SOFTBODY_USE_REPLAY
37 enum class USBS_REPLAY_STATE
60 void cleanup(
void)
override;
69 void kill(
void)
override;
72 void asyncUpdate(
void)
override;
74 void sequentialUpdate(
void)
override;
77#if SOFTBODY_USE_REPLAY
79 void startReplayingData(u32 replayNumber = 0,
b32 isRepeat =
false);
81 void endReplayingData(
void);
83 void startWritingReplayData(u32 replayNumber = 0, u32 saveFrame = 0xFFFFFFFF);
85 void endWritingReplayData(
void);
119 b32 isSimulation(
void)
const;
121 b32 isSimulationChain(u32 index)
const;
123 b32 isSimulationCloth(u32 index)
const;
129 void setIsSimulation(
b32 enable);
132 b32 isInterpolateToMotion(
void)
const;
134 b32 isInterpolateToMotionChain(u32 index)
const;
136 b32 isInterpolateToMotionCloth(u32 index)
const;
139 void forceDisableSimulation(
void);
142 f32 getInterpolateTime(
void)
const;
144 void setInterpolateTime(f32 time);
147 b32 isMotionGravity(
void)
const;
149 void setIsMotionGravity(
b32 enable);
163 void setGravity(
const GxVector3 & gravity);
165 f32 getGravityForce(
void)
const;
167 void setGravityForce(f32 force);
169 const GxVector3& getGravityDirection(
void)
const;
171 void setGravityDirection(
const GxVector3& direction);
174 GX_FORCE_INLINE
GxVector3 getWind(
void)
const {
return getWindForce() * getWindDirection(); }
178 f32 getWindForce(
void)
const;
180 void setWindForce(f32 force);
182 const GxVector3& getWindDirection(
void)
const;
184 void setWindDirection(
const GxVector3& direction);
193 GX_FORCE_INLINE
virtual b32 isDevelopRender(
void)
const {
return _isDevelopRender; }
195 virtual void setDevelopRender(
b32 enable);
197 virtual void setDevelopRenderMassPoint(
b32 enable);
199 virtual void setForceDevelopRender(
b32 enable);
202 GX_FORCE_INLINE
void getPropertyWindForce(
void*
const pValue)
const { *
static_cast<f32*
>(pValue) = getWindForce(); }
204 GX_FORCE_INLINE
void setPropertyWindForce(
const void*
const pValue) { setWindForce(*
static_cast<f32*
>(
const_cast<void*
>(pValue))); }
206 GX_FORCE_INLINE
void getPropertyWindDirection(
void*
const pValue)
const { *
static_cast<GxVector3*
>(pValue) = getWindDirection(); }
208 GX_FORCE_INLINE
void setPropertyWindDirection(
const void*
const pValue) { setWindDirection( *
static_cast<GxVector3*
>(
const_cast<void*
>(pValue)) ); }
227#if SOFTBODY_USE_REPLAY
228 b32 _startReplayRead;
230 b32 _startReplayWrite;
239 GxResSoftbodySimulationReplay* _pReplayResource;
240 GxResSoftbodySimulationReplayXml* _pReplayResourceXml;
245 b32 _isDevelopRender;
251GX_UTILITY_NAMESPACE_END()
#define GX_PROHIBIT_CLASS_BASE_REFERENCE(__CLASS__)
GxClassBaseReference継承の禁止宣言(new以外の生成禁止 + コピー禁止)
Definition GxBase.h:244
モデル対応物理シミュレーション統合リソースクラス
Definition GxResSoftbodySimulation.h:18
実行時型情報クラス
Definition GxRtti.h:154
ユニット基礎クラス
Definition GxUnitBase.h:45
モデルベース鎖クラス
Definition GxUnitChainModel.h:18
モデルベース布クラス
Definition GxUnitClothModel.h:18
モデル基礎クラス
Definition GxUnitModelBase.h:19
クロスシミュレーション用コリジョンクラス
Definition GxUnitSoftbodyCollision.h:18
モデル対応シミュレーション統合ユニットクラス
Definition GxUnitSoftbodySimulation.h:24
constexpr u32 getChainCount(void) const
鎖ユニットの個数取得
Definition GxUnitSoftbodySimulation.h:98
GX_FORCE_INLINE GxVector3 getWind(void) const
風取得
Definition GxUnitSoftbodySimulation.h:174
u32 _chainCount
チェーンシミュレーション数
Definition GxUnitSoftbodySimulation.h:221
GX_FORCE_INLINE void setIsUpdateAllMatrix(b32 is)
重力を修正してモーションへ収束させるか設定
Definition GxUnitSoftbodySimulation.h:189
GX_FORCE_INLINE GxVector3 getGravity(void) const
重力取得
Definition GxUnitSoftbodySimulation.h:161
GxUnitSoftbodyCollision * _pCollision
シミュレーションが使用するコリジョン
Definition GxUnitSoftbodySimulation.h:225
u32 _clothCount
クロスシミュレーション数
Definition GxUnitSoftbodySimulation.h:222
constexpr GxUnitChainModel * getChainUnit(u32 index) const
指定番号の鎖ユニット取得
Definition GxUnitSoftbodySimulation.h:101
b32 _isUpdateAllMatrix
全関節行列更新するかフラグ // for 枝分かれ関節
Definition GxUnitSoftbodySimulation.h:223
GX_FORCE_INLINE b32 isUpdateAllMatrix(void) const
重力を修正してモーションへ収束させるか設定
Definition GxUnitSoftbodySimulation.h:187
GxUnitModelBase * _pParentModel
シミュレートするモデル
Definition GxUnitSoftbodySimulation.h:218
constexpr GxUnitClothModel * getClothUnit(u32 index) const
指定番号の布ユニット取得
Definition GxUnitSoftbodySimulation.h:109
constexpr u32 getClothCount(void) const
布ユニットの個数取得
Definition GxUnitSoftbodySimulation.h:106
GxResSoftbodySimulation * _pResource
シミュレーションリソース
Definition GxUnitSoftbodySimulation.h:217
GxUnitClothModel ** _ppClothList
クロスシミュレーションユニットリスト
Definition GxUnitSoftbodySimulation.h:220
GxUnitChainModel ** _ppChainList
チェーンシミュレーションユニットリスト
Definition GxUnitSoftbodySimulation.h:219
文字列型クラス
Definition GxString.h:18
関節構造体
Definition GxUnitModelBase.h:795
3次元ベクトル
Definition GxVector.h:245
static const GxVector3 AXIS_Y
(0, 1, 0)
Definition GxVector.h:262
32bitブーリアン
Definition GxDefine.h:173