OROCHI
 
Loading...
Searching...
No Matches
GxGuiPropertyQuaternion.h
Go to the documentation of this file.
1//===========================================================================
10//===========================================================================
11#pragma once
12
13#if GX_DEVELOP
14
15GX_CORE_NAMESPACE_BEGIN()
16
17class GxGuiTab;
18class GxGuiRotate;
19class GxGuiButtonHandle;
20//===========================================================================
22//===========================================================================
23class GxGuiPropertyQuaternion : public GxGuiPropertyClass
24{
25 //-----------------------------------------------------------
27 //-----------------------------------------------------------
29public:
30 GX_RTTI_CLASS(GxGuiPropertyQuaternion, GxGuiPropertyClass)
31 // ClassBaseReference継承クラス用禁止宣言
32 GX_PROHIBIT_CLASS_BASE_REFERENCE(GxGuiPropertyQuaternion)
33
34private:
36 static constexpr u32 TAB_HEIGHT = GxSysTool::FONT_HALF_SIZE_HEIGHT + 2;
37
39 //-----------------------------------------------------------
41 //-----------------------------------------------------------
43public:
45 GxGuiPropertyQuaternion(void);
47 GxGuiPropertyQuaternion(const GxProperty& property, GxTypedObject* pOwner, u32 index = 0 );
48
50 //-----------------------------------------------------------
52 //-----------------------------------------------------------
54public:
56 b32 initialize( void ) override;
57
59 void update( void ) override;
60
61protected:
63 void onExpand(b32 on) override;
65 void createControlGui(void);
66
68 //-----------------------------------------------------------
70 //-----------------------------------------------------------
72public:
74 constexpr GxGuiButtonHandle* getGuiButtonHandle( void ) const { return _pGuiButtonHandle; }
75
77 void setParentMatrix( const GxMatrixAffine* pGxMatrixAffine );
79 void setParentMatrix( const GxMatrix44* pGxMatrix44 );
81 void setParentMatrix( const GxProperty& property, GxTypedObject* pOwner, u32 index = 0 );
82
86 void setQuaternion( const GxQuaternion& quaternion );
87
89 //-----------------------------------------------------------
91 //-----------------------------------------------------------
93protected:
94 GxProperty _parentMatrixProperty;
95 GxTypedObject* _pParentMatrixOwner;
96 u32 _parentMatrixIndex;
97
98 GxGuiButtonHandle* _pGuiButtonHandle;
99
100 GxGuiTab* _pGuiTab;
101 GxGuiPropertyClass* _pGuiClass;
102 GxGuiRotate* _pGuiRotate[ 6/*GxGuiRotate::MUL_ROTATE_NUM*/ ];
103 GxQuaternion _previousValue;
104 s32 _delayValueChanged;
105
107};
108
109class GxGuiPropertySlider;
110
111//===========================================================================
113//===========================================================================
114class GxGuiRotate : public GxGuiBase
115{
116 //-----------------------------------------------------------
118 //-----------------------------------------------------------
120public:
121 GX_RTTI_CLASS(GxGuiRotate, GxGuiBase)
122 // ClassBaseReference継承クラス用禁止宣言
124
125
126 enum class MUL_ROTATE
127 {
128 XYZ = 0,
129 XZY,
130 YXZ,
131 YZX,
132 ZXY,
133 ZYX,
134 MAX
135 };
136
138 //-----------------------------------------------------------
140 //-----------------------------------------------------------
142public:
144 GxGuiRotate(void);
146 GxGuiRotate( MUL_ROTATE type, b32 isReadOnly = false );
147
149 b32 initialize(void) override;
150
152 //-----------------------------------------------------------
154 //-----------------------------------------------------------
156protected:
158 void onSize(const GxSize& size) override;
159
161 GxSize getUseRegionSize(void) const override;
162
164 //-----------------------------------------------------------
166 //-----------------------------------------------------------
168public:
171 void setQuaternion( const GxQuaternion& quaternion );
172
175 GxQuaternion getQuaternion( void ) const;
176
178 b32 isControl( void ) const;
179
181 b32 isValueChanged( void ) const;
182
184 //-----------------------------------------------------------
186 //-----------------------------------------------------------
188protected:
189 GxVector3 _rotate;
190
191 MUL_ROTATE _type;
192
193 GxGuiPropertySlider* _pSliderX;
194 GxGuiPropertySlider* _pSliderY;
195 GxGuiPropertySlider* _pSliderZ;
196
198};
199
200GX_CORE_NAMESPACE_END()
201
202#endif // GX_DEVELOP
#define GX_PROHIBIT_CLASS_BASE_REFERENCE(__CLASS__)
GxClassBaseReference継承の禁止宣言(new以外の生成禁止 + コピー禁止)
Definition GxBase.h:244
@ MAX
定義数
void GxTypedObject
その他
Definition GxDefine.h:213
void getQuaternion(f32 data[3], f32 outData[4])
回転を取得
Definition GxMotionEncoder.cpp:319
プロパティクラス
Definition GxProperty.h:48
4×4行列(行優先)
Definition GxMatrix.h:607
アフィン変換行列(行優先)
Definition GxMatrix.h:330
クォータニオン
Definition GxQuaternion.h:19
サイズ
Definition GxStruct.h:730
3次元ベクトル
Definition GxVector.h:245
32bitブーリアン
Definition GxDefine.h:173