モーション再生クラス More...
#include <GxMotionPlayer.h>


Public Member Functions | |
初期化 | |
| GxMotionPlayer (void) | |
| デフォルトコンストラクタ | |
| ~GxMotionPlayer (void) override | |
| デストラクタ | |
| void | initialize (GxResMotionPackage *pResource) |
| 初期化 | |
| virtual void | reset (void) |
| リセット | |
Public Member Functions inherited from GxClassBase | |
| constexpr | GxClassBase (void) |
| コンストラクタ | |
| constexpr | GxClassBase (const GxClassBase &base) |
| コピーコンストラクタ | |
| ~GxClassBase (void) override | |
| デストラクタ | |
Public Member Functions inherited from GxClassBaseRoot | |
| constexpr | GxClassBaseRoot (void) |
| コンストラクタ | |
| constexpr | GxClassBaseRoot (const GxClassBaseRoot &) |
| コピーコンストラクタ | |
| virtual | ~GxClassBaseRoot (void) |
| デストラクタ | |
| constexpr GxClassBaseRoot & | operator= (const GxClassBaseRoot &) |
| 代入演算子 | |
| virtual GxRtti & | getRtti (void) const =0 |
| Rttiの取得 | |
| virtual GX_FORCE_INLINE const GxTypedObject * | getDefaultObject (void) |
| デフォルトオブジェクトを取得 | |
| GX_FORCE_INLINE b32 | isDefaultObject (void) |
| デフォルトオブジェクト判定 | |
Friends | |
定義 | |
| class | GxModUnitMotionBlend |
メンバ変数 | |
| |
| s32 | _ikChainCount |
| モーションデータのなかのIKチェーン数 | |
| u32 | _updateIkChainCount |
| 取得したい関節のIKチェーンだけの数 | |
| u32 | _ikEffecterTargetCount |
| IKエフェクタのターゲット数 | |
| GxVector3 * | _pIkEffecterTargetArray |
| IKエフェクタのターゲット配列 | |
| GxIkChain * | _pIkChainArray |
| IKチェーン配列 | |
| GxJointDataArray | _originDataArray |
| 補間の前の関節データを保存する行列 | |
| GxJointDataArray | _interpolateDataArray |
| 補間された関節データを保存する行列 | |
| b32 | _interpolatingMotion |
| モーション補間中かどうか | |
| f32 | _interpolateFrameElapsed |
| 補間のフレームカウント | |
| b32 | _isEnableInterpolateDataArray |
| _interpolateDataArray配列に入っている値が有効かどうか | |
| GxVector3 | _rootPosition |
| ユーザーが欲しいルート座標 | |
操作 | |
| virtual GX_FORCE_INLINE b32 | isExistScale (const GxMotionJointData *pJoint) const |
| 関節にスケールがあるか無いかの判定 | |
| void | updateFrame (void) |
| モーションフレームの更新 | |
| void | updateJointLocalData (void) |
| モーションの関節のローカルデータを更新 | |
| b32 | change (s32 motionNumber=static_cast< s32 >(GxModUnitMotionBase::MOTION_INDEX::BEGIN), f32 startFrame=0.f, f32 speedRatio=1.f, f32 transitionFrameNumber=0.f, u32 playbackFlags=0) |
| オプションを設定して再生 | |
| b32 | changeMotion (s32 motionNumber=static_cast< s32 >(GxModUnitMotionBase::MOTION_INDEX::BEGIN)) |
| モーション番号だけを設定して前のオプションで再生 | |
| void | updateJointMatrices (u32 jointStartNumber, u32 jointCount) |
| 各関節のモーションマトリクスを更新 | |
| GX_FORCE_INLINE void | updateJoints (void) |
| 各関節を更新 | |
| b32 | loadBasepose (void const *pBasePoseData) |
| ベースポーズのロードと関節行列のアロケート | |
| virtual void | allocateJointArray (void) |
| 関節配列をアロケート | |
| virtual void | updateRootPosition (void) |
| ルート座標のポジションを更新 | |
| GxMatrixAffine & | calculateJointMatrix (GxMotionJoint const *pFinalJoint, GxMatrixAffine &jointMatrix) |
| 指定された関節のモーションマトリクスだけ計算 | |
| virtual void | calculateInterpolation (void) |
| モーション補間時の関節の計算 | |
| void | calculateLocalData2BonesIK (u32 chainStartJointNumber) |
| 指定されたIKチェーンが始まる関節の子関節(+その子になるエフェクタ関節)のローカルデータ(回転)を計算 | |
| void | calculateMotionDataMatrices2BonesIK (u32 chainStartJointNumber) |
| 指定されたモーションデータの「IKチェーン」を始まる関節の子関節(+その子になるエフェクタ関節)のマトリクスを計算 | |
アクセサ | |
| void | setMotionNumber (s32 motionNumber) |
| モーション番号を設定 - 有効な番号か確認しない - フレームを0.fにリセット | |
| virtual GX_FORCE_INLINE f32 | getFrame (void) const |
| 現在のフレーム数を取得 | |
| void | setFrame (f32 frame) |
| 現在のフレーム数を設定 | |
| virtual GX_FORCE_INLINE f32 | getFrameNumber (f32 milliSeconds) const |
| ミリ秒からフレーム数を取得 | |
| virtual GX_FORCE_INLINE f32 | getMilliSeconds (f32 frameNumber) const |
| フレーム数からミリ秒を取得 | |
| virtual GX_FORCE_INLINE f32 | getSpeed (void) const |
| スピードを取得 | |
| constexpr void | setSpeed (f32 speed) |
| スピードを設定 | |
| virtual GX_FORCE_INLINE u32 | getPlaybackFlags (void) const |
| 再生フラグを取得 | |
| virtual GX_FORCE_INLINE b32 | isPlaybackFlag (MOTION_PLAYBACK_FLAG flag) const |
| 再生フラグの判定 | |
| void | setPlaybackFlags (u32 playbackFlags) |
| 再生フラグを設定 | |
| void | setPlaybackFlag (MOTION_PLAYBACK_FLAG flag, b32 value) |
| 一つだけの再生フラグを設定 | |
| constexpr f32 | getDeltaTime (void) const |
| デルタタイムを取得 | |
| constexpr f32 | getDeltaTimeRatio (void) const |
| デルタタイム比率を取得 | |
| constexpr void | setDeltaTime (f32 deltaTime) |
| デルタタイムを設定 | |
| constexpr void | setDeltaTimeRatio (f32 deltaTimeRatio) |
| デルタタイム比率を設定 | |
| constexpr s32 | getMotionNumber (void) const |
| 現在のモーション番号を取得 | |
| constexpr u32 | getMotionNumberMin (void) const |
| 最小番号を取得 | |
| constexpr u32 | getMotionNumberMax (void) const |
| 最大番号を取得 | |
| u16 | getMotionFrameCount (u32 motionNumber) const |
| 指定モーションのフレーム数を取得 | |
| GX_FORCE_INLINE u16 | getMotionFrameCount (void) const |
| 設定中モーションのフレーム数を取得 | |
| GX_FORCE_INLINE f32 | getFrameMax (void) const |
| 設定中モーションの最大フレーム数を取得 | |
| GX_FORCE_INLINE f32 | getFrameMax (u32 motionNumber) const |
| 指定モーションの最大フレーム数を取得 | |
| b32 | isFinish (void) const |
| 終了判定 | |
| b32 | isFinishNextFrame (void) const |
| 次のフレームの終了判定 | |
| b32 | isLoopTiming (void) const |
| setFrame()が前回呼び出された時、ループしたかを判断 - setFrame()を呼び出した後、setMotionNumber()、setSpeed()を呼び出した場合、戻り値が無効になります。 | |
| constexpr u32 | getMotionCount (void) const |
| モーション数を取得 | |
| constexpr f32 | getMotionRotateY (void) const |
| rot_y関節の回転値を取得 | |
| constexpr f32 | getMotionTranslateY (void) const |
| rot_y関節の移動値を取得 | |
| constexpr f32 | getStartFrame (void) const |
| モーション再生を開始したフレームを取得 | |
| constexpr void | setDecodeType (GxMotionCurvesContainerQuaternion::DECODE_TYPE type) |
| データの展開タイプを設定(GxMotionCurvesContainerQuaternionのときのみ有効) | |
| GX_FORCE_INLINE void | enableLinearInterpolation (b32 flag) |
| フレーム間のsrt各要素の線形補間をon offできるAPI。デフォルトはtrue, モーションの初期化(setMotionNumber)前のみ有効 | |
| void | forceEnableLinearInterpolation (b32 flag) |
| フレーム間srt各要素の線形補間on/offフラグをモーション初期化後に強制的に書き換える | |
| constexpr GxResMotionPackage * | getResMotionPackage (void) |
| モーションアドレスを取得 | |
| GX_FORCE_INLINE GxMotionJoint & | getJointRaw (const u32 id) const |
| 間接を取得(更新チェックなしの生アクセス用) | |
| GxMotionJoint const * | getJointArray (void) const |
| 関節ポインタの取得 | |
| GxMotionJoint const * | getJoint (const u32 id) const |
| 関節ポインタの取得(constあり) | |
| GxMotionJoint * | getJoint (const u32 id) |
| 関節ポインタの取得(constなし) | |
| constexpr s32 | getJointCount (void) const |
| 関節数を取得 | |
| GX_FORCE_INLINE void | getUpdateJoint (void *pValue, u32 index) |
| 関節配列を取得 | |
| void | updateJointMatricesNoIK (u32 jointStartNumber, u32 jointCount) |
| 各関節のモーションマトリクスを更新(IK計算なし) | |
| GX_FORCE_INLINE b32 | isJointArrayUpToDate (void) const |
| 関節配列が更新されたか判定 | |
| GX_FORCE_INLINE void | checkJointsLocalData (void) |
| テストをして関節配列を更新 | |
| virtual void | changeTransitionSettings (f32 transitionFrameNumber, INTERPOLATE interpolateType, f32 transitionCurvature) |
| 補間のパラメータを一括で設定 | |
| virtual GX_FORCE_INLINE void | setInterpolateFrameNumber (f32 interpolateFrameNumber) |
| 補間フレーム数を設定 | |
| virtual GX_FORCE_INLINE f32 | getInterpolateFrameNumber (void) const |
| 補間フレーム数を取得 | |
| virtual GX_FORCE_INLINE void | setInterpolateType (INTERPOLATE interpolateType) |
| 補間のタイプを設定 | |
| virtual GX_FORCE_INLINE INTERPOLATE | getInterpolateType (void) |
| 補間のタイプを取得 | |
| virtual GX_FORCE_INLINE void | setInterpolateCurvature (f32 interpolateCurvature) |
| 補間の曲率を設定 | |
| virtual GX_FORCE_INLINE f32 | getInterpolateCurvature (void) const |
| 補間の曲率を取得 | |
| constexpr GxResMotionInterpolationSettings const * | getInterpolationSettings (void) const |
| モーション補間設定リソースを取得 | |
| constexpr void | setInterpolationSettings (GxResMotionInterpolationSettings const *pResInterpolateSettings) |
| モーション補間設定リソースを設定 | |
| GX_FORCE_INLINE f32 | getInterpolationRatio (f32 frameElapsed) |
| 比率を計算 | |
| constexpr GxIkChain const * | getIkChainArray (void) const |
| IKチェーン配列の取得 | |
| GX_FORCE_INLINE GxIkChain const * | getIkChain (u32 index) const |
| IKチェーンの取得(const あり) | |
| GX_FORCE_INLINE GxIkChain * | getIkChain (u32 index) |
| IKチェーンの取得(const なし) | |
| constexpr u32 | getIkChainCount (void) const |
| IKチェーンの数を取得 | |
| GX_FORCE_INLINE GxJointDataArray * | getInterpolationOriginArray (void) |
| 補間前行列の取得 | |
| constexpr void | setInterpolateFrameElapsed (f32 value) |
| 補間フレーム数の設定 | |
| constexpr u32 const * | getMotionPackageData (void) const |
| モーションアドレスを取得 | |
| u32 const * | getMotionData (s32 index) const |
| モーションアドレスを取得 | |
| GX_FORCE_INLINE b32 | isPlayDifferenceMotion (void) |
| 差分モーションを再生中かどうかを取得 | |
| GX_FORCE_INLINE void | setPlayDifferenceMotion (b32 isPlayDifferenceMotion) |
| 差分モーションを再生中かどうかを設定 | |
| constexpr GxIkChain * | getIkChainArray (void) |
| 関節ポインタの取得 | |
| virtual void | setTranslateRotateToJointArray (void) |
| 全関節に位置と回転値を設定 | |
| void | setTranslateRotateQuatToOneJoint (GxMotionCurvesContainerQuaternion *pMotionCurvesContainerQuaternion, u32 jointIndex) |
| 関節に位置と回転値を設定 | |
| f32 const * | setTranslateRotateEulerToOneJoint (GxMotionJointData *pJointToSet, f32 const *pMotionDataReader, b32 isRootLocator) |
| 関節に位置と回転値を設定 | |
| constexpr void | setDummyValueIndex (const void *, u32) |
| ダミー値インデックスを設定 | |
| constexpr void | setDummySize (u32) |
| ダミーサイズを設定 | |
Additional Inherited Members | |
Static Public Member Functions inherited from GxClassBaseRoot | |
| static GX_FORCE_INLINE GxRtti & | __getStaticRtti (void) |
| Rttiの取得 | |
モーション再生クラス
|
protected |
指定された関節のモーションマトリクスだけ計算
| pFinalJoint | [in] 最後の関節 |
| jointMatrix | [in] 関節マトリクス |


|
protected |
指定されたIKチェーンが始まる関節の子関節(+その子になるエフェクタ関節)のローカルデータ(回転)を計算
| chainStartJointNumber | [in] モーション番号 |


|
protected |
指定されたモーションデータの「IKチェーン」を始まる関節の子関節(+その子になるエフェクタ関節)のマトリクスを計算
| chainStartJointNumber | [in] IKチェーンの開始関節番号 |


| b32 GxMotionPlayer::change | ( | s32 | motionNumber = static_cast<s32>(GxModUnitMotionBase::MOTION_INDEX::BEGIN), |
| f32 | startFrame = 0.f, | ||
| f32 | speedRatio = 1.f, | ||
| f32 | transitionFrameNumber = 0.f, | ||
| u32 | playbackFlags = 0 ) |
オプションを設定して再生
| startFrame | [in] 開始フレーム |
| speedRatio | [in] 毎フレーム(エンジン側)のモーションフレーム増加分 - increment used to update motion every frame |
| transitionFrameNumber | [in] 補間フレーム数 - 警告!無視されます(使いたいなら、GxMotionPlayerを使用) |
| playbackFlags | [in] 再生オプションフラグ |


| b32 GxMotionPlayer::changeMotion | ( | s32 | motionNumber = static_cast<s32>(GxModUnitMotionBase::MOTION_INDEX::BEGIN) | ) |
モーション番号だけを設定して前のオプションで再生
| motionNumber [in] | モーション番号 |

|
virtual |
補間のパラメータを一括で設定
| transitionFrameNumber | [in] 補間フレーム番号 |
| transitionType | [in] 補間タイプ |
| transitionCurvature | [in] 補間曲率 |
| void GxMotionPlayer::forceEnableLinearInterpolation | ( | b32 | flag | ) |
フレーム間srt各要素の線形補間on/offフラグをモーション初期化後に強制的に書き換える
| flag | [in] フラグ |

| GxMotionJoint * GxMotionPlayer::getJoint | ( | const u32 | id | ) |
関節ポインタの取得(constなし)
| id | モーションデータ上の関節番号 |

| const GxMotionJoint * GxMotionPlayer::getJoint | ( | const u32 | id | ) | const |
関節ポインタの取得(constあり)
| id | [in] モーションデータ上の関節番号 |


| const GxMotionJoint * GxMotionPlayer::getJointArray | ( | void | ) | const |
関節ポインタの取得


|
protected |
モーションアドレスを取得
| index | [in] インデックス |


| u16 GxMotionPlayer::getMotionFrameCount | ( | u32 | motionNumber | ) | const |
指定モーションのフレーム数を取得
| motionNumber | [in] モーション番号 |


| void GxMotionPlayer::initialize | ( | GxResMotionPackage * | pResource | ) |
初期化
| pResource | [in] リソース |


| b32 GxMotionPlayer::isFinish | ( | void | ) | const |
終了判定

| b32 GxMotionPlayer::isFinishNextFrame | ( | void | ) | const |
次のフレームの終了判定


| b32 GxMotionPlayer::isLoopTiming | ( | void | ) | const |
setFrame()が前回呼び出された時、ループしたかを判断 - setFrame()を呼び出した後、setMotionNumber()、setSpeed()を呼び出した場合、戻り値が無効になります。
|
protected |
ベースポーズのロードと関節行列のアロケート
| pBasePoseData | [in] ベースポーズのローデータ |


| void GxMotionPlayer::setFrame | ( | f32 | frame | ) |
現在のフレーム数を設定
| frame | [in] フレーム |


| void GxMotionPlayer::setMotionNumber | ( | s32 | motionNumber | ) |
モーション番号を設定 - 有効な番号か確認しない - フレームを0.fにリセット
| motionNumber | [in] モーション番号 |


| void GxMotionPlayer::setPlaybackFlag | ( | MOTION_PLAYBACK_FLAG | flag, |
| b32 | value ) |
一つだけの再生フラグを設定
| flag | [in] 再生フラグ |
| value | [in] 値 |


| void GxMotionPlayer::setPlaybackFlags | ( | u32 | playbackFlags | ) |
再生フラグを設定
| playbackFlags | [in] 再生フラグ |


|
protected |
関節に位置と回転値を設定
| pJointToSet | [in/out] 設定したい関節 |
| pMotionDataReader | [in] モーションカーブのデータ |
| isRootLocator | [in] ルートロケーターかどうか |


|
protected |
関節に位置と回転値を設定
| pMotionCurvesContainerQuaternion | [in] カーブコンテナの回転 |
| jointIndex | [in] 関節インデックス |


| void GxMotionPlayer::updateJointLocalData | ( | void | ) |
モーションの関節のローカルデータを更新


| void GxMotionPlayer::updateJointMatrices | ( | u32 | jointStartNumber, |
| u32 | jointCount ) |
各関節のモーションマトリクスを更新
| jointStartNumber | [in] 開始関節番号 |
| jointCount | [in] 関節数 |


| void GxMotionPlayer::updateJointMatricesNoIK | ( | u32 | jointStartNumber, |
| u32 | jointCount ) |
各関節のモーションマトリクスを更新(IK計算なし)
| jointStartNumber | [in] 開始関節番号 |
| jointCount | [in] 関節数 |

