OROCHI
 
Loading...
Searching...
No Matches
GxToolTextureProperty.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 GxToolTextureProperty : public GxToolResourceViewBase
21{
22 //-------------------------------------------------------------
24 //-------------------------------------------------------------
26public:
27 // RTTI定義
28 GX_RTTI_CLASS_NAME_ICON( GxToolTextureProperty, GxToolResourceViewBase, "テクスチャビューワ", GxRtti::ICON_TYPE::CORE)
29 // ClassBaseReference継承クラス用禁止宣言
30 GX_PROHIBIT_CLASS_BASE_REFERENCE( GxToolTextureProperty )
31
32 class GxGuiFormTextureParam;
33
35 //-------------------------------------------------------------
37 //-------------------------------------------------------------
39
41 GxToolTextureProperty(void);
42
44 b32 initialize( void ) override;
45
47 //-------------------------------------------------------------
49 //-------------------------------------------------------------
51public:
53 void update( void ) override;
55 void setResource(GxResBase* pResource) override;
56
58 //-------------------------------------------------------------
60 //-------------------------------------------------------------
62
64 //-------------------------------------------------------------
66 //-------------------------------------------------------------
68
69 GxGuiFormTextureParam* _pFormTexture;
70
72};
73
74//===========================================================================
76//===========================================================================
77class GxToolTextureProperty::GxGuiFormTextureParam : public GxGuiFormTexture
78{
79 //-------------------------------------------------------------
81 //-------------------------------------------------------------
83public:
84 // RTTI定義
85 GX_RTTI_CLASS( GxToolTextureProperty::GxGuiFormTextureParam, GxGuiFormTexture )
86 // ClassBaseReference継承クラス用禁止宣言
87 GX_PROHIBIT_CLASS_BASE_REFERENCE( GxGuiFormTextureParam )
88
89
90 //-------------------------------------------------------------
92 //-------------------------------------------------------------
94
96 GxGuiFormTextureParam( void );
97
99 //-------------------------------------------------------------
101 //-------------------------------------------------------------
103
105 void update( void ) override;
106
108 void drawUvLines( GxPoint2 beginPosition, GxPoint2 endPosition );
109
111 GxVector2 calculationRectangleToUv( const GxPoint2 position, const GxSize size );
112
113protected:
115 void onDraw(void) override;
116
118 void updateFormSize(void);
119
121 void onClick(const GxPoint2& position, u32 button) override;
122
124 void onMouseDown(const GxPoint2& position, u32 button) override;
125
127 void onMouseUp(const GxPoint2& position, u32 button) override;
128
130 void onMouseMove(const GxPoint2& position) override;
131
133 //-----------------------------------------------------------
135 //-----------------------------------------------------------
137public:
139 void setRenderTexture( GxRenderTexture* pRenderTexture ) override;
140
142 void setZoom( const GxVector2& zoom ) override;
143
145 GX_FORCE_INLINE GxPoint2 getTexelPosition( void ) const { return _texelPosition; }
146
148 //-------------------------------------------------------------
150 //-------------------------------------------------------------
152private:
153 u32 _memorySize;
154 u32 _nonMipMemorySize;
155
156 b32 _isAllOn;
157 b32 _isRedOn;
158 b32 _isGreenOn;
159 b32 _isBlueOn;
160
161 b32 _isAllOnOld;
162 b32 _isRedOnOld;
163 b32 _isGreenOnOld;
164 b32 _isBlueOnOld;
165
166 b32 _isDrawAllMip;
167 b32 _isDrawAllMipOld;
168 b32 _isExpandX;
169
170 GxColor _color;
171 GxColor _backgroundColor;
172 b32 _isDrawBackground;
173 b32 _isDrawBlending;
174
175 GxColorHDR _texelParam;
176 GxPoint2 _texelPosition;
177 GxPoint2 _oldTexelPosition;
178
179 GxPoint2 _uvBegin;
180 GxPoint2 _uvEnd;
181 GxVector2 _rectUvBegin;
182 GxVector2 _rectUvEnd;
183
184 b32 _isGradation;
185 f32 _gradationMin;
186 f32 _gradationMax;
187
189};
190
191GX_CORE_NAMESPACE_END()
192
193#endif // GX_DEVELOP
#define GX_PROHIBIT_CLASS_BASE_REFERENCE(__CLASS__)
GxClassBaseReference継承の禁止宣言(new以外の生成禁止 + コピー禁止)
Definition GxBase.h:244
テクスチャクラス
Definition GxRenderTexture.h:19
リソース基底クラス
Definition GxResBase.h:23
色(HDR)
Definition GxColor.h:241
Definition GxColor.h:21
座標
Definition GxStruct.h:867
サイズ
Definition GxStruct.h:730
2次元ベクトル
Definition GxVector.h:34
32bitブーリアン
Definition GxDefine.h:173