OROCHI
 
Loading...
Searching...
No Matches
GxUnitChainModel Class Reference

モデルベース鎖クラス More...

#include <GxUnitChainModel.h>

Inheritance diagram for GxUnitChainModel:
Collaboration diagram for GxUnitChainModel:

Classes

struct  GxAdditionalData
 モデル基準鎖用追加情報クラス More...
 

Public Types

定義
enum class  UCM_UPDATESTATE { RESET_TO_SIMULATION , SIMULATION , INTERPOLATION_TO_MOTION , MOTION }
 状態遷移管理 More...
 
- Public Types inherited from GxUnitBase
enum class  STATE { SETUP , RUNNING , DELETE_ }
 状態 More...
 
enum  ATTRIBUTE {
  ATTRIBUTE_UPDATE = (1 << 0) , ATTRIBUTE_SELECTED = (1 << 1) , ATTRIBUTE_LOCK = (1 << 2) , ATTRIBUTE_SLOW = (1 << 3) ,
  ATTRIBUTE_NOSERIALIZE = (1 << 4)
}
 属性 More...
 

Public Member Functions

初期化
 GxUnitChainModel (void)
 デフォルトコンストラクタ
 
b32 initialize (GxResSoftbodySimulation::GxSoftbodyChainData *pChain, GxUnitModelBase *pParent)
 初期化(コンストラクタの直後(セットアップ前)に呼ぶこと)
 
void cleanup (void) override
 解放処理
 
アクセサ
GX_FORCE_INLINE const GxAdditionalDatagetAdditionalData (void) const
 モデル基準鎖追加情報取得
 
constexpr s32 getJointIndex (u32 index) const
 モデル関節番号取得
 
constexpr void setJointIndex (u32 index, s32 jointIndex)
 モデル関節番号設定
 
const GxQuaterniongetOldQuaternion (u32 index) const
 モーションへの補間のためのクォータニオンを取得
 
GX_FORCE_INLINE void setOldQuaternion (u32 index, const GxQuaternion &quaternion)
 モーションへの補間のためのクォータニオンを設定
 
constexpr f32 getRadius (u32 index) const
 各質点の当たり半径を取得
 
constexpr void setRadius (u32 index, f32 radius)
 各質点の当たり半径を設定
 
const GxQuaterniongetTwist (u32 index) const
 ねじれ回転取得
 
GX_FORCE_INLINE void setTwist (u32 index, const GxQuaternion &twist)
 ねじれ回転設定
 
constexpr f32 getTwistLimit (u32 index) const
 ねじれ回転限界角度取得
 
constexpr void setTwistLimit (u32 index, f32 limit)
 ねじれ回転限界角度設定
 
GX_FORCE_INLINE const GxVector3getNormal (u32 index) const
 追加情報による入力法線取得
 
GX_FORCE_INLINE void setNormal (u32 index, const GxVector3 &normal)
 追加情報による入力法線設定
 
GX_FORCE_INLINE const GxVector3getHitBackDir (u32 index) const
 ねじれ計算用当たり方向取得
 
GX_FORCE_INLINE void setHitBackDir (u32 index, const GxVector3 &dir)
 ねじれ計算用当たり方向設定
 
GX_FORCE_INLINE b32 isHitBack (u32 index) const
 参照しているコリジョンに当たったか判定
 
GX_FORCE_INLINE void setIsHitBack (u32 index, b32 isHitBack)
 参照しているコリジョンに当たったか設定
 
constexpr f32 getAngleLimit (u32 index) const
 回転限界角度取得
 
constexpr void setAngleLimit (u32 index, f32 limit)
 回転限界角度設定
 
GX_FORCE_INLINE const GxVector3getAngleAxis (u32 index) const
 回転角度基準軸取得
 
GX_FORCE_INLINE void setAngleAxis (u32 index, const GxVector3 &axis)
 回転角度基準軸設定
 
constexpr f32 getBaseRatio (u32 index) const
 基姿勢の割合を取得
 
constexpr void setBaseRatio (u32 index, f32 baseRatio)
 基姿勢の割合を設定
 
GX_FORCE_INLINE GxVector3 getWindRatio (u32 index) const
 風を受ける割合を取得
 
GX_FORCE_INLINE void setWindRatio (u32 index, GxVector3 &windRatio)
 風を受ける割合を設定
 
constexpr u32 getID (void) const
 ID取得
 
constexpr u32 getPointCount (void) const
 質点数を取得
 
- Public Member Functions inherited from GxUnitChainBase
 GxUnitChainBase (void)
 デフォルトコンストラクタ
 
- Public Member Functions inherited from GxUnitSoftbodyBase
constexpr GxUnitSoftbodyCollisiongetCollision (void) const
 コリジョンユニット取得
 
constexpr void setCollision (GxUnitSoftbodyCollision *pCollision)
 コリジョンユニット設定
 
constexpr u32 getPointCount (void) const
 シミュレート点数の取得
 
constexpr u32 getLineCount (void) const
 シミュレート線数の取得
 
constexpr f32 getMass (void) const
 質量取得 : 途中変更無効
 
constexpr f32 getAirDamping (void) const
 空気抵抗取得
 
constexpr void setAirDamping (f32 damping)
 空気抵抗設定
 
constexpr f32 getWindForce (void) const
 風力取得
 
constexpr void setWindForce (f32 windForce)
 風力設定
 
GX_FORCE_INLINE const GxVector3getWindDirection (void) const
 風向取得
 
GX_FORCE_INLINE void setWindDirection (const GxVector3 &windDirection)
 風向設定
 
constexpr f32 getHitBackForceDamper (void) const
 当たり抵抗定数取得
 
constexpr void setHitBackForceDamper (f32 damper)
 当たり抵抗定数設定
 
constexpr f32 getUpdateDelta (void) const
 更新間隔取得
 
constexpr void setUpdateDelta (f32 delta)
 更新間隔設定
 
constexpr u32 getMoveStrength (u32 index) const
 平行移動伝播率の取得 [ 0 ~ 100 ]
 
constexpr void setMoveStrength (u32 strength, u32 index)
 平行移動伝播率の設定 [ 0 ~ 100 ]
 
constexpr f32 getWarpLengthSquare (void) const
 瞬間移動検出距離(の二乗)取得
 
constexpr void setWarpLengthSquare (f32 length)
 瞬間移動検出距離(の二乗)設定
 
GX_FORCE_INLINE const GxVector3getWarpPosition (void) const
 瞬間移動検出参照位置取得 : 自動更新、変更禁止
 
GX_FORCE_INLINE void setExtraLoop (f32 time=1.0f)
 空ループ(シミュレーションが落ち着くまで待つ)設定 : 時間も一緒に決める(デフォルト 1秒)
 
GX_FORCE_INLINE b32 isUpdateExtraLoop (void) const
 空ループする(シミュレーションが落ち着くまで待つ)かどうか取得
 
GX_FORCE_INLINE void setIsUpdateExtraLoop (void)
 空ループする(シミュレーションが落ち着くまで待つ)よう設定
 
constexpr f32 getExtraLoopTime (void) const
 空ループする時間を取得 [ sec ]
 
constexpr void setExtraLoopTime (f32 time)
 空ループする時間を設定 [ sec ]
 
constexpr f32 getGravityForce (void) const
 重力取得
 
constexpr void setGravityForce (f32 force)
 重力設定
 
constexpr f32 getAdjustGravityBlendRate (void) const
 ローカル重力方向と補整重力方向のブレンド率を取得
 
constexpr void setAdjustGravityBlendRate (f32 blandRate)
 ローカル重力方向と補整重力方向のブレンド率を設定
 
GX_FORCE_INLINE const GxVector3getGravityDirection (void) const
 ローカル重力方向取得
 
GX_FORCE_INLINE void setGravityDirection (const GxVector3 &direction)
 ローカル重力方向設定
 
GX_FORCE_INLINE const GxVector3getAdjustGravityDirection (void) const
 補整重力方向取得
 
GX_FORCE_INLINE void setAdjustGravityDirection (const GxVector3 &direction)
 補整重力方向設定
 
void cleanup (void) override
 解放処理
 
- Public Member Functions inherited from GxUnitBase
 GxUnitBase (void)
 コンストラクタ
 
constexpr f32 getDeltaTimeFactor (void) const
 デルタタイム係数を取得
 
constexpr void setDeltaTimeFactor (f32 deltaTimeFactor)
 デルタタイム係数を設定
 
constexpr f32 getDeltaTime (void) const
 デルタタイムを取得
 
constexpr void setDeltaTime (f32 deltaTime)
 デルタタイムを設定
 
constexpr f32 getDeltaTimeRatio (void) const
 デルタタイムレート(通常のフレームレートの何倍か)を取得
 
constexpr void setDeltaTimeRatio (f32 deltaTimeRatio)
 デルタタイムレート(通常のフレームレートの何倍か)を設定
 
constexpr STATE getState (void) const
 状態を取得
 
constexpr void setState (STATE state)
 状態を設定(ユーザーは使用してはならない内部使用)
 
GX_FORCE_INLINE b32 isEnable (void) const
 有効か判定
 
constexpr u32 getAttribute (void) const
 属性を取得
 
GX_FORCE_INLINE b32 isAttribute (ATTRIBUTE attribute) const
 属性を判定
 
GX_FORCE_INLINE void setAttribute (ATTRIBUTE attribute, b32 enable)
 属性を設定
 
GX_FORCE_INLINE b32 isRender (void) const
 描画フラグ判定
 
void setRender (b32 enable, b32 withChildren=false)
 描画フラグを設定
 
GX_FORCE_INLINE GxFlag32Index< RENDER_VIEWgetRenderViewFlag (void) const
 描画するビューフラグを取得
 
GX_FORCE_INLINE b32 isRenderView (RENDER_VIEW view) const
 描画するビューを判定
 
GX_FORCE_INLINE void setRenderView (RENDER_VIEW view, b32 enable)
 描画するビューを設定
 
GX_FORCE_INLINE b32 isRenderSubView (RENDER_SUB_VIEW subView) const
 描画するサブビューを判定
 
GX_FORCE_INLINE void setRenderSubView (RENDER_SUB_VIEW subView, b32 enable)
 描画するサブビューを設定
 
GX_FORCE_INLINE b32 isUpdateEnable (UPDATE_TYPE updateType) const
 更新を呼ぶかを判定
 
GX_FORCE_INLINE void setUpdateEnable (UPDATE_TYPE updateType, b32 enable)
 更新を呼ぶかを設定
 
GX_FORCE_INLINE void getPropertyAttributeUpdate (void *const pValue)
 プロパティ用:更新処理の属性を取得
 
GX_FORCE_INLINE void setPropertyAttributeUpdate (const void *const pValue)
 プロパティ用:更新処理の属性を設定
 
template<typename T >
T * getModule (void) const
 モジュールを取得
 
constexpr u32 getChildCount (void) const
 子ユニット数を取得
 
constexpr GxUnitBasegetChild (u32 index) const
 子ユニットを取得
 
constexpr GxUnitBasegetParent (void) const
 親ユニットを取得
 
void setParent (GxUnitBase *pParent)
 親ユニットを設定
 
constexpr GxResUnitInstancegetResUnitInstance (void) const
 ユニットインスタンスリソースを取得
 
void setResUnitInstance (GxResUnitInstance *pResUnitInstance)
 ユニットインスタンスリソースを設定
 
constexpr void getPropertyResUnitInstance (void *const pValue)
 ユニットインスタンスリソースプロパティの取得
 
void setPropertyResUnitInstance (const void *const pValue)
 ユニットインスタンスリソースプロパティの設定
 
GX_FORCE_INLINE const GxTypedObjectgetDefaultObject (void) override
 デフォルトオブジェクトを取得
 
constexpr GxUnitBasegetDefaultUnit (void) const
 デフォルトユニットを取得
 
void setDefaultUnit (GxUnitBase *pDefaultUnit)
 デフォルトユニットを設定
 
void sleep (f32 time)
 スリープ(スクリプト用)
 
template<typename T >
T * createAndAddChild (u32 listProcessNumber=U32_MAX, u32 listKindNumber=U32_MAX, b32 isSerialize=false, const GxRtti *pRtti=nullptr)
 子ユニットを追加作成
 
- Public Member Functions inherited from GxClassBaseReference
 GxClassBaseReference (void)
 コンストラクタ
 
 GxClassBaseReference (const GxClassBaseReference &base)
 コピーコンストラクタ
 
 ~GxClassBaseReference (void) override
 デストラクタ
 
constexpr GxClassBaseReferenceoperator= (const GxClassBaseReference &base)
 代入演算子
 
virtual s32 addReference (void)
 参照カウンタを加算
 
virtual s32 release (void)
 解放
 
virtual s32 getReferenceCount (void) const
 参照カウンタを取得
 
constexpr void setDelayReleaseCount (s32 count)
 遅延解放カウンタを設定
 
void setDelayReleaseCountInfinity (b32 on)
 無限解放待ちの設定
 
- Public Member Functions inherited from GxClassBaseRoot
constexpr GxClassBaseRoot (void)
 コンストラクタ
 
constexpr GxClassBaseRoot (const GxClassBaseRoot &)
 コピーコンストラクタ
 
virtual ~GxClassBaseRoot (void)
 デストラクタ
 
constexpr GxClassBaseRootoperator= (const GxClassBaseRoot &)
 代入演算子
 
virtual GxRttigetRtti (void) const =0
 Rttiの取得
 
GX_FORCE_INLINE b32 isDefaultObject (void)
 デフォルトオブジェクト判定
 

Protected Attributes

メンバ変数
b32 _isUseAdditionalData
 追加データの有無フラグ
 
b32 _isUseMotionGravity
 モーションへ収束するために重力方向を修正するかフラグ
 
GxAdditionalData_pAdditionalData
 追加データ
 
GxUnitModelBase_pParentModel
 変更するモデル
 
b32 _isChainSimulation
 クロスシミュレーションするかフラグ
 
UCM_UPDATESTATE _updateState
 モデルの更新とモーションの切り替え状態
 
f32 _interpolateTime
 補間にかける時間
 
f32 _interpolateInnerTime
 補間時間 ( 0.0f < t < 1.0f )
 
b32 _isUpdateAllMatrix
 UpdateWorldMatrix をするかフラグ
 
f32 _twistInterpolateSpeed
 ねじれ補間速度 ( 0.0f < t < 1.0f )
 
GxVector3 _tailOffsetLocal
 末端関節のオフセット ( Local Coodinate )
 
GxVector3 _tailOffsetWorld
 末端関節のオフセット ( World Coodinate )
 
- Protected Attributes inherited from GxUnitChainBase
GxCell_pCell
 質点データ
 
f32 _kt
 バネ定数 - 伸びにくさ係数
 
f32 _kb
 バネ定数 - 曲げにくさ係数
 
u32 _id
 任意ID
 
- Protected Attributes inherited from GxUnitSoftbodyBase
GxUnitSoftbodyCollision_pCollision
 コリジョンデータ
 
GxUnitSoftbodyCollision_pCollisionOld
 1フレーム前のコリジョンデータ
 
b32_pIsUpdateCollision
 シミュレーション後にコリジョンデータを更新するかどうか
 
u32 _pointCount
 点の数
 
u32 _lineCount
 線の数
 
u32 _planeCount
 面の数 // 三次元拡張時
 
f32 _mass
 全体重さ
 
f32 _airDamping
 空気抵抗定数
 
f32 _windForce
 風の大きさ的な
 
GxVector3 _windDirection
 風の向き的な
 
f32 _hitBackForceDamper
 当たり反発位置修正ダンパ [ 0.0f - 1.0f ]
 
f32 _updateDelta
 1 シミュレート時間
 
u32 _moveStrength [2]
 固定位置の移動を下位に伝える強さ [ 0 ~ 100 ]
 
f32 _moveStrengthCoefficient
 Y軸平行移動量への係数
 
GxVector3 _warpPosition
 ワープを検出するときの位置
 
f32 _warpLengthSquare
 ワープとみなす閾値(長さの二乗値
 
b32 _isExtraLoop
 このフラグがオンのフレームは安定動作のために空ループする
 
f32 _extraLoopTime
 空ループを回す時間 [ sec ]
 
f32 _gravityForce
 重力大きさ
 
GxVector3 _gravityDirection
 ローカル重力方向
 
GxVector3 _adjustGravityDirection
 補整重力方向
 
f32 _adjustGravityBlendRate
 ローカル重力と補整重力のブレンド率(デフォルトは0.0fで、ローカル重力のみ利用)
 
b32 _isRandom
 乱数を使用するかフラグ
 
b32 _isLocalWind
 風向きを親ユニットのローカルで扱うかフラグ
 
b32 _excludeTailJointSkin
 末端以外のジョイントをシミュレーションするフラグ
 
- Protected Attributes inherited from GxClassBaseReference
s32 _referenceCount
 参照カウンタ
 
s32 _delayReleaseCount
 遅延解放カウンタ
 

操作

void kill (void) override
 ユニットの消去リクエスト
 
virtual void setAdditionalData (GxResSoftbodySimulation::GxSoftbodyChainAdditionalData *pResourceAdditionalData)
 モデル基準鎖用追加情報設定
 
GX_FORCE_INLINE b32 isMotionGravity (void) const
 重力を修正してモーションへ収束させる判定
 
GX_FORCE_INLINE void setIsMotionGravity (b32 enable)
 重力を修正してモーションへ収束させる設定
 
void setMotionGravity (b32 enable, f32 gravityForce, const GxVector3 &gravityDirection=-GxVector3::AXIS_Y)
 重力を修正してモーションへ収束させる設定 - パラメータ変更込み
 
constexpr void reset (void)
 外から呼べるリセット
 
GX_FORCE_INLINE b32 isChainSimulation (void) const
 有効判定
 
GX_FORCE_INLINE void setIsChainSimulation (b32 enable)
 有効設定(シミュレーションとモーションを補間して遷移)
 
GX_FORCE_INLINE b32 isInterpolateToMotion (void) const
 シミュレーションからモーションへ補間している状態かどうか判定
 
GX_FORCE_INLINE void forceDisableChainSimulation (void)
 シミュレーションを強制終了してモーションへ(補間しない)
 
constexpr f32 getInterpolateTime (void) const
 補間時間の取得(シミュレーション→モーションの補間にかける時間)
 
constexpr void setInterpolateTime (f32 time)
 補間時間の設定(シミュレーション→モーションの補間にかける時間)
 
b32 setup (void) override
 セットアップ ( update 開始直前によばれる)
 
void postAsyncUpdate (void) override
 非同期更新(任意に asyncUpdate の後に実行される)
 
virtual void resetup (void)
 シミュレーション位置を関節の位置で初期化
 
b32 interpolateToMotion (void)
 シミュレーション位置から関節の位置へ補間
 
virtual void updateModel (void)
 シミュレーションをモデルへ反映
 
virtual void updateInterpolateModel (void)
 シミュレーションからモーションへの補間をモデルへ反映
 
b32 isWarp (void) override
 毎フレーム開始時にワープとみなすかどうか判断
 
void updateInitialize (void) override
 毎フレームの初期化
 
void interpolatePosition (f32 updateRatio, f32 updateRatioOld) override
 更新時間に応じた位置補間
 
void calculateExternalForce (GxVector3 &windDirect) override
 各点にかかる外力の算出
 
void calculateHitBackForce (f32 updateRatio, f32 updateRatioOld) override
 各点の当たり判定
 
void updateConstraint (void) override
 各点間の距離による強制
 
virtual b32 analyseCollisionJoint (GxUnitSoftbodyCollision::GxHitBase *pHitBase)
 コリジョンがシミュレーション用ジョイントにアタッチされているかどうか解析
 
virtual void updateCollisionAfterSimulation (void)
 シミュレーション後に必要なコリジョンのみ更新
 

Additional Inherited Members

- Static Public Member Functions inherited from GxClassBaseReference
static void initializeDelayRelease (void)
 遅延解放リストの初期化
 
static void terminateDelayRelease (void)
 遅延解放リストの終了
 
static void updateDelayRelease (void)
 遅延解放リストの更新
 
static b32 isDelayReleaseEnable (void)
 遅延解放システムの有効判定
 
static u32 getDelayReleaseListCount (void)
 遅延解放待ちの数を取得
 
- Static Public Member Functions inherited from GxClassBaseRoot
static GX_FORCE_INLINE GxRtti__getStaticRtti (void)
 Rttiの取得
 
- Static Public Attributes inherited from GxUnitChainBase
static const f32 _ktDefault = 1.0f
 バネ定数 - 伸びにくさ係数
 
static const f32 _kbDefault = 0.1f
 バネ定数 - 曲げにくさ係数
 
- Static Public Attributes inherited from GxUnitSoftbodyBase
static const GxVector3 _gravityDefault = GxVector3( 0.0f, -9.8f, 0.0f )
 重力初期値 [ m/s^2 ]
 
static const GxVector3 _gravityDirectionDefault = GxVector3( 0.0f, -1.0f, 0.0f )
 重力方向初期値 [ m/s^2 ]
 
static const f32 _gravityForceDefault = 9.80f
 重力大きさ初期値 [ m/s^2 ]
 
static const f32 _airDampingDefault = 0.2f
 空気抵抗初期値 [ 正数 ]
 
static const f32 _windForceDefault = 0.0f
 風力初期値 [ 正数 ]
 
static const GxVector3 _windDirectionDefault = GxVector3(1.0f,0.0f,0.0f)
 風向初期値 [ Normalized ]
 
static const f32 _massDefault = 0.1f
 質量初期値 [ kg ]
 
static const f32 _updateDeltaDefault = 0.01f
 更新間隔初期値 [ 秒 ]
 
static const f32 _hitbackForceDamperDefault = 0.3f
 跳ね返り力初期値 [ 0.0 - 1.0 ]
 
static const f32 _warpLengthSquareDefault = 1.0f*1.0f
 瞬間移動検出距離(の二乗)初期値 [ m^2 ]
 
- Static Public Attributes inherited from GxClassBaseReference
static constexpr s32 DELAY_RELEASE_COUNT_INFINITY = -1
 遅延解放の無限待ち定義
 
- Protected Member Functions inherited from GxUnitChainBase
void updateForce (f32 updateRatio, f32 updateRatioOld) override
 各質点にかかる力の算出
 
virtual void calculateBaseVector (void)
 各点の法線基準を算出
 
virtual void calculateInternalForce (void)
 各点にかかる内力の算出
 
void updateCell (void) override
 各質点情報を更新
 
constexpr f32 kT (f32 ks) const
 バネ定数 - 伸びにくさ係数を取得
 
constexpr f32 kB (f32 ks) const
 バネ定数 - 曲げにくさ係数を取得
 
constexpr f32 getKT (void) const
 伸びにくさの取得
 
constexpr void setKT (f32 kt)
 伸びにくさの設定
 
constexpr f32 getKB (void) const
 曲げにくさの取得
 
constexpr void setKB (f32 kb)
 曲げにくさの設定
 
GX_FORCE_INLINE void * getCellPointer (void) const override
 質点データ取得
 
GX_FORCE_INLINE const GxVector3getPosition (u32 index) const
 質点位置取得
 
GX_FORCE_INLINE void setPosition (u32 index, const GxVector3 &position)
 質点位置設定
 
GX_FORCE_INLINE b32 isFixed (u32 index) const
 質点固定情報取得
 
GX_FORCE_INLINE void setFixed (u32 index, b32 isFix)
 質点固定情報設定
 
- Protected Member Functions inherited from GxUnitSoftbodyBase
void postAsyncUpdate (void) override
 非同期更新
 
void render (void) override
 描画
 
 GxUnitSoftbodyBase (void)
 デフォルトコンストラクタ
 
- Protected Member Functions inherited from GxUnitBase
virtual void preAsyncUpdate (void)
 並列更新(asyncUpdateの前に実行される)
 
virtual void asyncUpdate (void)
 並列更新
 
virtual void sequentialUpdate (void)
 逐次更新
 
virtual void forceAsyncUpdate (void)
 強制並列更新(pause中も実行)
 
virtual b32 setRenderMaterial (GxRenderMaterial *pMaterial, const GxResModel::GxMeshGroup *pMeshGroup)
 マテリアルの描画設定
 
template<typename T >
T * addModule (void)
 モジュールを作成
 
template<typename T >
void removeModule (void)
 モジュールを削除
 

Detailed Description

モデルベース鎖クラス

Member Enumeration Documentation

◆ UCM_UPDATESTATE

状態遷移管理

Enumerator
RESET_TO_SIMULATION 

チェーンシミュレーション再開

SIMULATION 

チェーンシミュレーション動作中

INTERPOLATION_TO_MOTION 

チェーンシミュレーションとモーションの補間中

MOTION 

モーション動作中

Member Function Documentation

◆ analyseCollisionJoint()

b32 GxUnitChainModel::analyseCollisionJoint ( GxUnitSoftbodyCollision::GxHitBase * pHitBase)
protectedvirtual

コリジョンがシミュレーション用ジョイントにアタッチされているかどうか解析

Parameters
pHitBase[in] コリジョン
Returns
コリジョンがシミュレーション用ジョイントにアタッチされているならtrue
Here is the call graph for this function:
Here is the caller graph for this function:

◆ calculateExternalForce()

void GxUnitChainModel::calculateExternalForce ( GxVector3 & windDirect)
overrideprotectedvirtual

各点にかかる外力の算出

Parameters
windDirect[in] 風向き

Reimplemented from GxUnitChainBase.

Here is the call graph for this function:

◆ calculateHitBackForce()

void GxUnitChainModel::calculateHitBackForce ( f32 updateRatio,
f32 updateRatioOld )
overrideprotectedvirtual

各点の当たり判定

Parameters
updateRatio[in] フレーム時間を更新間隔で割った現在の時間割合
updateRatioOld[in] フレーム時間を更新間隔で割った前回の時間割合

Reimplemented from GxUnitChainBase.

Here is the call graph for this function:

◆ cleanup()

void GxUnitChainModel::cleanup ( void )
overridevirtual

解放処理

Reimplemented from GxUnitChainBase.

◆ initialize()

b32 GxUnitChainModel::initialize ( GxResSoftbodySimulation::GxSoftbodyChainData * pChain,
GxUnitModelBase * pParent )

初期化(コンストラクタの直後(セットアップ前)に呼ぶこと)

Parameters
pChain[in] 設定するリソースデータ
pParent[in] シミュレーションさせるモデル
Returns
成功ならtrue
Here is the call graph for this function:

◆ interpolatePosition()

void GxUnitChainModel::interpolatePosition ( f32 updateRatio,
f32 updateRatioOld )
overrideprotectedvirtual

更新時間に応じた位置補間

Parameters
updateRatio[in] フレーム時間を更新間隔で割った現在の時間割合
updateRatioOld[in] フレーム時間を更新間隔で割った前回の時間割合

Reimplemented from GxUnitChainBase.

Here is the call graph for this function:

◆ interpolateToMotion()

b32 GxUnitChainModel::interpolateToMotion ( void )
protected

シミュレーション位置から関節の位置へ補間

Returns
補間終了ならtrue
Here is the call graph for this function:
Here is the caller graph for this function:

◆ isInterpolateToMotion()

GX_FORCE_INLINE b32 GxUnitChainModel::isInterpolateToMotion ( void ) const
inline

シミュレーションからモーションへ補間している状態かどうか判定

モーション補間中も、局所行列の情報がなければ正常に動作できない
しかしながら、常に局所行列情報を算出するのは負荷が高いため、新たに補間中であるか取得するための関数を追加

Here is the caller graph for this function:

◆ isWarp()

b32 GxUnitChainModel::isWarp ( void )
overrideprotectedvirtual

毎フレーム開始時にワープとみなすかどうか判断

Returns
ワープを検出したらtrue

Reimplemented from GxUnitChainBase.

Here is the call graph for this function:

◆ kill()

void GxUnitChainModel::kill ( void )
overridevirtual

ユニットの消去リクエスト

Reimplemented from GxUnitBase.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ postAsyncUpdate()

void GxUnitChainModel::postAsyncUpdate ( void )
overrideprotectedvirtual

非同期更新(任意に asyncUpdate の後に実行される)

Reimplemented from GxUnitBase.

Here is the call graph for this function:

◆ reset()

void GxUnitChainModel::reset ( void )
inlineconstexpr

外から呼べるリセット

この関数が呼ばれると、シミュレーションが再開、または再起動する

◆ setAdditionalData()

void GxUnitChainModel::setAdditionalData ( GxResSoftbodySimulation::GxSoftbodyChainAdditionalData * pResourceAdditionalData)
virtual

モデル基準鎖用追加情報設定

Parameters
pResourceAdditionalData[in] リソースの保持する追加情報
Here is the call graph for this function:
Here is the caller graph for this function:

◆ setIsChainSimulation()

GX_FORCE_INLINE void GxUnitChainModel::setIsChainSimulation ( b32 enable)
inline

有効設定(シミュレーションとモーションを補間して遷移)

正確には、モーションからシミュレーションに切り替わる際は、モーションの姿勢を初期値とするため補間はない
シミュレーションからモーションへ切り替える場合のみ現在の姿勢からモーションの姿勢まで回転を時間線形に球面補間する

Here is the caller graph for this function:

◆ setMotionGravity()

void GxUnitChainModel::setMotionGravity ( b32 enable,
f32 gravityForce,
const GxVector3 & gravityDirection = -GxVector3::AXIS_Y )

重力を修正してモーションへ収束させる設定 - パラメータ変更込み

setMotionGravity の第一引数に true を与えると、重力方向は設定パラメータに因らず、 モデル関節のモーションで指定された方向へ重力を向ける
大きさは第二引数で与えられた値を用いる
また、第一引数に false が与えられた場合、第三引数で鉛直方向以外の重力方向を設定可能
この方向は、すべての質点に同等の向きを与える(個別設定不可)

Parameters
enable[in] 有効/無効
gravityForce[in] 重力大きさ
gravityDirection[in] 重力方向
Here is the call graph for this function:
Here is the caller graph for this function:

◆ setup()

b32 GxUnitChainModel::setup ( void )
overrideprotectedvirtual

セットアップ ( update 開始直前によばれる)

Returns
成功ならtrue

Reimplemented from GxUnitChainBase.

Here is the call graph for this function:

◆ updateConstraint()

void GxUnitChainModel::updateConstraint ( void )
overrideprotectedvirtual

各点間の距離による強制

Reimplemented from GxUnitChainBase.

Here is the call graph for this function:

◆ updateInitialize()

void GxUnitChainModel::updateInitialize ( void )
overrideprotectedvirtual

毎フレームの初期化

Reimplemented from GxUnitChainBase.

Here is the call graph for this function:

The documentation for this class was generated from the following files: