OROCHI
 
Loading...
Searching...
No Matches
GxGuiButtonHandle.h
Go to the documentation of this file.
1//===========================================================================
10//===========================================================================
11#pragma once
12
13#if GX_DEVELOP
14
15GX_CORE_NAMESPACE_BEGIN()
16
17//===========================================================================
19//===========================================================================
20class GxGuiButtonHandle : public GxGuiButton
21{
22 //-----------------------------------------------------------
24 //-----------------------------------------------------------
26public:
27 GX_RTTI_CLASS(GxGuiButtonHandle, GxGuiButton)
28 // GxGuiButtonHandle継承クラス用禁止宣言
29 GX_PROHIBIT_CLASS_BASE_REFERENCE(GxGuiButtonHandle)
30
31
32 //-----------------------------------------------------------
34 //-----------------------------------------------------------
36
37public:
39 GxGuiButtonHandle(void);
40
42 //-----------------------------------------------------------
44 //-----------------------------------------------------------
46public:
48 b32 initialize( void ) override;
49
51 void update( void ) override;
52
54 void cleanup( void ) override;
55
56private:
58 void onMouseDown(const GxPoint2& position, u32 button) override;
59
61 GX_FORCE_INLINE void eventHandleOn(void) { setOnHandle(); }
62
64 //-----------------------------------------------------------
66 //-----------------------------------------------------------
68public:
70 constexpr void setPosition( GxVector3* pPosition ){ _pPosition = pPosition; }
71
73 constexpr void setQuaternion( GxQuaternion* pQuaternion){ _pQuaternion = pQuaternion; }
74
76 constexpr void setScale( GxVector3* pScale ){ _pScale = pScale; }
77
79 constexpr void setParentMatrix( const GxMatrix44* pMatrix ){ _pParentMatrix44 = pMatrix; }
80
82 constexpr void setParentMatrix( const GxMatrixAffine* pMatrix ){ _pParentMatrixAffine = pMatrix; }
83
86 constexpr GxHandle* getHandle( void ) const { return _pHandle; }
87
89 b32 isControlHandle( void ) const;
90
92 void setOnHandle( void );
93
95 GX_FORCE_INLINE void setUseControl( b32 useControl ){ _useControl = useControl; }
96
98 GX_FORCE_INLINE void set2D( void ) { _is2D = true; }
100 GX_FORCE_INLINE void setDisableHandleTypeTranslate( void) { _isEnableHandleTypeTranslate = false; }
102 GX_FORCE_INLINE void setDisableHandleTypeRotate( void ) { _isEnableHandleTypeRotate = false; }
104 GX_FORCE_INLINE void setDisableHandleTypeScale( void ) { _isEnableHandleTypeScale = false; }
105
107 //-----------------------------------------------------------
109 //-----------------------------------------------------------
111protected:
112 GxHandle* _pHandle;
113 GxHandle::HANDLE_RESULT _handleResult;
114
115 GxVector3* _pPosition;
116 GxQuaternion* _pQuaternion;
117 GxVector3* _pScale;
118
119 b32 _isMoveHandle;
120
121 const GxMatrix44* _pParentMatrix44;
122 const GxMatrixAffine* _pParentMatrixAffine;
123
124 b32 _useControl;
125
126 b32 _is2D;
127 b32 _isEnableHandleTypeTranslate;
128 b32 _isEnableHandleTypeRotate;
129 b32 _isEnableHandleTypeScale;
130
132};
133
134GX_CORE_NAMESPACE_END()
135
136#endif // GX_DEVELOP
#define GX_PROHIBIT_CLASS_BASE_REFERENCE(__CLASS__)
GxClassBaseReference継承の禁止宣言(new以外の生成禁止 + コピー禁止)
Definition GxBase.h:244
4×4行列(行優先)
Definition GxMatrix.h:607
アフィン変換行列(行優先)
Definition GxMatrix.h:330
座標
Definition GxStruct.h:867
クォータニオン
Definition GxQuaternion.h:19
3次元ベクトル
Definition GxVector.h:245
32bitブーリアン
Definition GxDefine.h:173