OROCHI
 
Loading...
Searching...
No Matches
GxJointData.h
Go to the documentation of this file.
1//===========================================================================
10//===========================================================================
11#pragma once
12
13GX_MOTION_NAMESPACE_BEGIN()
14
15class GxMotionJoint;
16
17//-----------------------------------------------------------
19//-----------------------------------------------------------
20struct GxJointData : public GxClassBase
21{
22 //-----------------------------------------------------------
24 //-----------------------------------------------------------
26
27 // RTTI宣言
28 GX_RTTI_CLASS(GxJointData, GxClassBase)
29 // アロケータ指定
30 GX_OPERATOR_NEW_DELETE_USE_ARRAY(GxAllocatorList::ALLOCATOR_TYPE::UNIT);
31
33 static const GxJointData ZERO;
34
36 //-----------------------------------------------------------
38 //-----------------------------------------------------------
40
42 GxJointData(void);
44 GxJointData(GxQuaternion const& rotate, GxVector3 const& translate, b32 isIk, GxVector3 const& ikTarget, b32 isScale, GxVector3 const& scale);
46 GxJointData(GxMotionJoint const& joint);
48 b32 operator==(GxJointData const& other) const;
50 b32 operator!=(GxJointData const& other) const;
51
53 //-----------------------------------------------------------
55 //-----------------------------------------------------------
57
59 void addLocalData(GxJointData const& other, f32 otherWeight, f32 thisWeight, u32 blendFlags, ROTATE_BLEND rotateBlendType);
60
62 //-----------------------------------------------------------
64 //-----------------------------------------------------------
66
73
75};
76
77//-----------------------------------------------------------
79//-----------------------------------------------------------
81{
82 //-----------------------------------------------------------
84 //-----------------------------------------------------------
86public:
87 // RTTI宣言
88 GX_RTTI_CLASS(GxJointDataArray, GxClassBase)
89 // アロケータ指定
90 GX_OPERATOR_NEW_DELETE_USE_ARRAY(GxAllocatorList::ALLOCATOR_TYPE::UNIT);
91
93 //-----------------------------------------------------------
95 //-----------------------------------------------------------
97
99 GxJointDataArray(void);
101 GxJointDataArray(u32 dataArraySize);
105 ~GxJointDataArray(void);
107 void initialize(u32 dataArraySize);
109 void erase(void);
111 void resetValues(void);
115 b32 operator==(GxJointDataArray const& other) const;
117 b32 operator!=(GxJointDataArray const& other) const;
118
120 //-----------------------------------------------------------
122 //-----------------------------------------------------------
124
126 void blend(GxJointDataArray const& other, f32 otherWeight, f32 thisWeight, u32 blendFlags, ROTATE_BLEND rotateBlendType);
127
129 //-----------------------------------------------------------
131 //-----------------------------------------------------------
133
135 GX_FORCE_INLINE GxJointData& operator[](u32 index) { return _pDataArray[index]; }
137 GX_FORCE_INLINE GxJointData const& operator[](u32 index) const { return _pDataArray[index]; }
139 constexpr u32 getCount(void) const { return _dataArraySize; }
140
142 void getJointData(void* pValue, u32 index);
144 constexpr void setDummyValueIndex(const void* /*pValue*/, u32 /*index*/) {}
146 constexpr u32 getJointDataCount(void) const { return _dataArraySize; }
148 constexpr void setDummyCount(u32 /*count*/) {}
149
151 //-----------------------------------------------------------
153 //-----------------------------------------------------------
155private:
156 u32 _dataArraySize;
157 GxJointData* _pDataArray;
158
160};
161
162GX_MOTION_NAMESPACE_END()
GX_FORCE_INLINE b32 operator==(const GxColor color0, const GxColor color1)
Definition GxColor.inl:274
GX_FORCE_INLINE b32 operator!=(const GxColor color0, const GxColor color1)
Definition GxColor.inl:285
ROTATE_BLEND
回転ブレンドのタイプ
Definition GxMotionDefine.h:54
オブジェクト基底クラス
Definition GxBase.h:88
インナークラス(関節のローカルデータ配列クラス)
Definition GxJointData.h:81
constexpr u32 getJointDataCount(void) const
関節データ数を取得
Definition GxJointData.h:146
constexpr void setDummyCount(u32)
ダミー数を設定
Definition GxJointData.h:148
void getJointData(void *pValue, u32 index)
関節データ
Definition GxJointData.cpp:490
GxJointDataArray(void)
デフォルトコンストラクタ
Definition GxJointData.cpp:207
constexpr void setDummyValueIndex(const void *, u32)
ダミー値インデックスを設定
Definition GxJointData.h:144
void resetValues(void)
各値をゼロに戻す
Definition GxJointData.cpp:362
b32 operator==(GxJointDataArray const &other) const
等価演算子
Definition GxJointData.cpp:303
b32 operator!=(GxJointDataArray const &other) const
非等価演算子
Definition GxJointData.cpp:327
GX_FORCE_INLINE GxJointData & operator[](u32 index)
配列演算子
Definition GxJointData.h:135
GxJointDataArray & operator=(GxJointDataArray const &other)
代入演算子
Definition GxJointData.cpp:278
void blend(GxJointDataArray const &other, f32 otherWeight, f32 thisWeight, u32 blendFlags, ROTATE_BLEND rotateBlendType)
データブレンド
Definition GxJointData.cpp:452
constexpr u32 getCount(void) const
要素数
Definition GxJointData.h:139
~GxJointDataArray(void)
デストラクタ
Definition GxJointData.cpp:247
void initialize(u32 dataArraySize)
メモリアロケート
Definition GxJointData.cpp:230
void erase(void)
メモリ削除
Definition GxJointData.cpp:349
GX_FORCE_INLINE GxJointData const & operator[](u32 index) const
配列演算子
Definition GxJointData.h:137
GxMotionが使う関節クラス
Definition GxMotionJoint.h:150
インナークラス(関節のローカルデータを保存するクラス)
Definition GxJointData.h:21
GxVector3 _translate
親に相当位置
Definition GxJointData.h:68
b32 _isScale
スケール値使うかフラグ
Definition GxJointData.h:71
GxVector3 _ikTarget
IKエフェクタ座標
Definition GxJointData.h:70
GxQuaternion _quaternion
親に相当回転
Definition GxJointData.h:67
GxVector3 _scale
スケール値
Definition GxJointData.h:72
static const GxJointData ZERO
ゼロデータ定義
Definition GxJointData.h:33
b32 _isIkTarget
_translateはIKエフェクタ座標かフラグ
Definition GxJointData.h:69
クォータニオン
Definition GxQuaternion.h:19
3次元ベクトル
Definition GxVector.h:245
32bitブーリアン
Definition GxDefine.h:173