モーションブレンドシステムの機能を導入するモジュール More...
#include <GxModUnitMotionBlend.h>
Public Types | |
定義 | |
| |
enum class | MOTION_PLAYER { BASE , BLEND_START , BLEND_1 = BLEND_START , BLEND_2 , BLEND_3 , BLEND_END = BLEND_3 , MAX , BLEND_MAX = BLEND_END - BLEND_START + 1 } |
モーションのインデックス More... | |
![]() | |
enum class | NODE { LOCATOR_ROOT = 0 , JOINT_ROOT } |
ノード番号定義 More... | |
enum class | MOTION_INDEX { SUM = 0 , BASEPOSE , BEGIN } |
GMPファイルのモーションインデックス More... | |
Public Member Functions | |
初期化 | |
GxModUnitMotionBlend (void) | |
デフォルトコンストラクタ | |
~GxModUnitMotionBlend (void) override | |
デストラクタ | |
void | initialize (GxResMotionPackage *pResMotPackage) override |
初期化 | |
![]() | |
GxModUnitMotionBase (void) | |
デフォルトコンストラクタ | |
~GxModUnitMotionBase (void) override | |
デストラクタ | |
GX_OPERATOR_NEW_DELETE_USE_ARRAY (GxAllocatorList::ALLOCATOR_TYPE::UNIT) | |
virtual GX_FORCE_INLINE GxMotionJoint & | getJointRaw (const u32 id) const |
間接を取得(更新チェックなしの生アクセス用) | |
virtual const GxMotionJoint * | getJointArray (void) const |
間接配列を取得 | |
virtual const GxMotionJoint * | getJoint (const u32 id) const |
間接を取得 | |
virtual GxMotionJoint * | getJoint (const u32 id) |
間接を取得 | |
virtual void | getJointChildren (GxMotionJoint const *pJoint, GxArray &result) |
pJointの子関節を取得 | |
virtual s32 | getJointIndexFromId (s32 id) const |
関節のIDからインデックスを取得 | |
virtual s32 | getJointCount (void) const |
関節数を取得 | |
void | getUpdateJoint (void *pValue, u32 index) |
関節配列を取得 | |
void | updateJointMatricesNoIK (u32 jointStartNumber, u32 jointCount) |
各関節のモーションマトリクスを更新(IK計算なし) | |
![]() | |
GxModUnitBase (void) | |
デフォルトコンストラクタ | |
~GxModUnitBase (void) override | |
デストラクタ | |
![]() | |
GxModBase (void) | |
デフォルトコンストラクタ | |
virtual | ~GxModBase (void) |
デストラクタ | |
![]() | |
constexpr | GxClassBase (void) |
コンストラクタ | |
constexpr | GxClassBase (const GxClassBase &base) |
コピーコンストラクタ | |
~GxClassBase (void) override | |
デストラクタ | |
![]() | |
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) |
デフォルトオブジェクト判定 | |
操作 | |
| |
b32 | setup (void) override |
セットアップ(preAsyncUpdate前に初回のみ実行される) | |
void | preAsyncUpdate (void) override |
並列更新(asyncUpdateの前に実行される) | |
void | asyncUpdate (void) override |
並列更新 | |
void | updateMotionJoint (void) |
モーションからの関節更新処理 | |
void | updateFrame (void) |
モーションフレームの更新 | |
b32 | change (s32 motionNumber=static_cast< s32 >(MOTION_INDEX::BEGIN), f32 startFrame=0.f, f32 speedRatio=1.f, f32 transitionFrameNb=9.f, u32 playbackFlags=0) |
オプションを設定して再生 | |
b32 | changeMotion (s32 motionNumber=static_cast< s32 >(MOTION_INDEX::BEGIN)) |
モーション番号だけを設定して前のオプションで再生 | |
GX_FORCE_INLINE void | updateJoints (void) |
各関節を更新 | |
void | updateJointLocalData (void) |
モーションの関節のローカルデータを更新 | |
void | updateJointMatrices (u32 jointStartNumber, u32 jointCount) |
各関節のモーションマトリクスを更新 | |
void | updateJointDataFromMotionModule (void) |
モーションモジュールから自身の骨データを更新 | |
アクセサ | |
constexpr GxResMotionPackage * | getResourceMotionPackage (void) const |
モーションリソースの取得 | |
constexpr void | setResourceMotionPackage (GxResMotionPackage *pResource) |
モーションリソースの設定 | |
void | setFrame (f32 frame) |
現在のフレーム値を設定 | |
void | setSpeed (f32 speed) |
スピードを設定 | |
void | setPlaybackFlags (u32 playbackFlags) |
再生フラグを設定 | |
void | setPlaybackFlag (MOTION_PLAYBACK_FLAG flag, b32 value) |
再生フラグを設定 | |
virtual void | setDeltaTime (f32 deltaTime) |
デルタタイムを設定 | |
void | setDeltaTimeRatio (f32 deltaTimeRatio) |
デルタタイム比率を設定 | |
GxResMotionBlend::BlendParam * | getBlendParamFromMotionModule (u32 paramIndex) |
ブレンド用モーションモジュールで使用されているブレンドパラメーターを取得 | |
b32 | getBlendParamFromBlendResource (s32 motionNumber, GxArrayClassBase *pOutBlendParamList) const |
ブレンドリソースから指定したモーションのブレンドパラメーターを取得 | |
virtual void | setModMotionBlendResource (GxResMotionBlend *pBlendResource) |
モーションブレンドリソースを設定 | |
constexpr GxResMotionBlend * | getModMotionBlendResource (void) const |
モーションブレンドリソースを取得 | |
virtual b32 | checkEnableBlend (const GxMotionJoint *pTargetJoint, GxResMotionBlend::BlendParam blendParam) |
指定された関節がブレンド対象か調べる | |
constexpr u32 | getNowMotionModuleCount (void) const |
現在使用しているモーションモジュール数を取得 | |
GX_FORCE_INLINE void | setUseBlend (b32 isUseBlend) |
モーションブレンドを使用するかどうかを設定 | |
GX_FORCE_INLINE b32 | isUseBlend (void) const |
モーションブレンドを使用するかどうかを取得 | |
constexpr u32 | getMotionPlayerCount (void) const |
モーションプレイヤーの最大数を取得(RTTI用) | |
constexpr GxMotionPlayer * | getMotionPlayer (MOTION_PLAYER index=GxModUnitMotionBlend::MOTION_PLAYER::BASE) const |
モーションプレイヤーを取得 | |
constexpr void | getMotionPlayer (void *pValue, u32 index) |
モーションプレイヤーを取得(RTTI用) | |
GX_FORCE_INLINE b32 | isMotionChange (void) const |
モーションの切り替わり判定 | |
GX_FORCE_INLINE const GxVector3 & | getRootPositionOld (void) const |
root関節の1フレーム前の座標を取得 | |
GX_FORCE_INLINE b32 | isMotionMoveXZ (void) |
モーションXZ移動値を使用するか判定 | |
GX_FORCE_INLINE void | setMotionMoveXZ (b32 flag) |
モーションXZ移動値を使用するか設定 | |
GX_FORCE_INLINE b32 | isMotionMoveY (void) |
モーションY移動値を使用するか判定 | |
GX_FORCE_INLINE void | setMotionMoveY (b32 flag) |
モーションY移動値を使用するか設定 | |
static GX_FORCE_INLINE const GxRtti & | getOwnerDerivedRtti (void) |
所持者に必要な継承RTTIを取得 | |
virtual GX_FORCE_INLINE GxMotionPlayer * | allocateMotion (void) |
モーションプレイヤーのメモリ確保 | |
Additional Inherited Members | |
![]() | |
static GX_FORCE_INLINE GxRtti & | __getStaticRtti (void) |
Rttiの取得 | |
![]() | |
void | setDummyValue (const void *) |
ダミー値を設定 | |
void | setDummyValueIndex (const void *, u32) |
ダミー値インデックスを設定 | |
void | setDummySize (u32) |
ダミーサイズを設定 | |
![]() | |
virtual GX_FORCE_INLINE void | postAsyncUpdate (void) |
並列更新(asyncUpdateの後に実行される) | |
virtual GX_FORCE_INLINE void | sequentialUpdate (void) |
逐次更新 | |
virtual GX_FORCE_INLINE void | forceAsyncUpdate (void) |
強制並列更新(pause中も実行) | |
virtual GX_FORCE_INLINE void | render (void) |
描画 | |
virtual GX_FORCE_INLINE b32 | setRenderMaterial (GxRenderMaterial *) |
マテリアルの描画設定 | |
GX_FORCE_INLINE GxUnitBase * | getOwner (void) const |
所持者を取得 | |
GX_FORCE_INLINE GxFlag32Index< UPDATE_TYPE > | getUpdateEnable (void) const |
更新を呼ぶかを取得 | |
GX_FORCE_INLINE void | setUpdateEnable (UPDATE_TYPE updateType, b32 enable) |
更新を呼ぶかを設定 | |
![]() | |
constexpr GxClassBaseRoot * | getOwner (void) const |
所持者を取得 | |
virtual GX_FORCE_INLINE void | setOwner (GxClassBaseRoot *pOwner) |
所持者を設定 | |
![]() | |
static const GxRtti & | getOwnerDerivedRtti (void) |
所持者に必要な継承RTTIを取得 | |
![]() | |
GxMotionJoint * | _pJointArray |
関節行列 | |
s32 | _jointCount |
モーションデータのなかの関節数 | |
モーションブレンドシステムの機能を導入するモジュール
|
strong |
|
overridevirtual |
b32 GxModUnitMotionBlend::change | ( | s32 | motionNumber = static_cast<s32>(MOTION_INDEX::BEGIN), |
f32 | startFrame = 0.f, | ||
f32 | speedRatio = 1.f, | ||
f32 | transitionFrameNumber = 9.f, | ||
u32 | playbackFlags = 0 ) |
オプションを設定して再生
motionNumber | [in] モーション番号 |
startFrame | [in] 開始フレーム |
speedRatio | [in] 速度比率 |
transitionFrameNumber | [in] 移動フレーム番号 |
playbackFlags | [in] 再生オプションフラグ |
b32 GxModUnitMotionBlend::changeMotion | ( | s32 | motionNumber = static_cast<s32>(MOTION_INDEX::BEGIN) | ) |
モーション番号だけを設定して前のオプションで再生
motionNumber | [in] モーション番号 |
|
virtual |
指定された関節がブレンド対象か調べる
pTargetJoint | [in] 関節 |
blendParam | [in] ブレンドパラメータ |
b32 GxModUnitMotionBlend::getBlendParamFromBlendResource | ( | s32 | motionNumber, |
GxArrayClassBase * | pOutBlendParamList ) const |
ブレンドリソースから指定したモーションのブレンドパラメーターを取得
motionNumber | [in] モーション番号 |
pOutBlendParamList | [out] ブレンドパラメータリスト |
GxResMotionBlend::BlendParam * GxModUnitMotionBlend::getBlendParamFromMotionModule | ( | u32 | parameterIndex | ) |
ブレンド用モーションモジュールで使用されているブレンドパラメーターを取得
parameterIndex | [in] パラメータインデックス |
|
overridevirtual |
初期化
pResMotionPackage | [in] モーションパッケージリソース |
Reimplemented from GxModUnitMotionBase.
|
overridevirtual |
並列更新(asyncUpdateの前に実行される)
Reimplemented from GxModUnitBase.
|
virtual |
デルタタイムを設定
deltaTime | [in] デルタタイム |
void GxModUnitMotionBlend::setDeltaTimeRatio | ( | f32 | deltaTimeRatio | ) |
デルタタイム比率を設定
deltaTimeRatio | [in] デルタタイム比率 |
void GxModUnitMotionBlend::setFrame | ( | f32 | frame | ) |
現在のフレーム値を設定
frame | [in] フレーム値 |
|
virtual |
モーションブレンドリソースを設定
pBlendResource | [in] ブレンドリソース |
void GxModUnitMotionBlend::setPlaybackFlag | ( | MOTION_PLAYBACK_FLAG | flag, |
b32 | enable ) |
再生フラグを設定
flag | [in] 再生フラグ |
enable | [in] 有効ならtrue |
void GxModUnitMotionBlend::setPlaybackFlags | ( | u32 | playbackFlags | ) |
再生フラグを設定
playbackFlags | [in] 再生フラグ |
void GxModUnitMotionBlend::setSpeed | ( | f32 | speed | ) |
スピードを設定
speed | [in] 再生スピード |
|
overridevirtual |
セットアップ(preAsyncUpdate前に初回のみ実行される)
Reimplemented from GxModUnitBase.
void GxModUnitMotionBlend::updateJointMatrices | ( | u32 | jointStartNumber, |
u32 | jointCount ) |
各関節のモーションマトリクスを更新
jointStartNumber | [in] 関節開始番号 |
jointCount | [in] 関節数 |