OROCHI
 
Loading...
Searching...
No Matches
GxUnit2DImageBase.h
Go to the documentation of this file.
1//===========================================================================
9//===========================================================================
10#pragma once
11
12GX_CORE_NAMESPACE_BEGIN()
13
14//===========================================================================
16//===========================================================================
18{
19 //-------------------------------------------------------------
21 //-------------------------------------------------------------
23public:
24 // RTTI定義
25 GX_RTTI_CLASS_NAME(GxUnit2DImageBase, GxUnit2DBase, "2D画像基礎")
26 // ClassBaseReference継承クラス用禁止宣言
28
29
30 //-------------------------------------------------------------
32 //-------------------------------------------------------------
34public:
36 GxUnit2DImageBase( void );
37
39 void cleanup( void ) override;
40
42 //-------------------------------------------------------------
44 //-------------------------------------------------------------
46protected:
48 void setMaterial(GxPrimitiveMaterial& material) const override;
49
50public:
52 void adjustSize( void );
53
55 //-------------------------------------------------------------
57 //-------------------------------------------------------------
59public:
61 constexpr GxResTexture* getTextureResource(void) const { return _pResTexture; }
63 virtual b32 setTextureResource( GxResTexture* pResTexture );
64
66 GX_FORCE_INLINE void getTextureResourceProperty( void* const pValue ) { *static_cast<GxResTexture**>(pValue) = getTextureResource(); }
68 GX_FORCE_INLINE void setTextureResourceProperty( const void* const pValue ) { setTextureResource(*static_cast<GxResTexture**>(const_cast<void*>(pValue))); }
69
71 GX_FORCE_INLINE GxRenderSamplerState getSamplerState( void ) const { return _samplerState; }
73 GX_FORCE_INLINE void setSamplerState( GxRenderSamplerState state ) { _samplerState = state; }
74
75#if GX_DEVELOP
77 //-------------------------------------------------------------
79 //-------------------------------------------------------------
81
83 void setResource( GxResBase* pResource ) override;
84
86 b32 isUseTexture( GxRenderTexture* pTexture ) override;
87#endif // GX_DEVELOP
88
90 //-------------------------------------------------------------
92 //-------------------------------------------------------------
94protected:
97
99};
100
101GX_CORE_NAMESPACE_END()
#define GX_PROHIBIT_CLASS_BASE_REFERENCE(__CLASS__)
GxClassBaseReference継承の禁止宣言(new以外の生成禁止 + コピー禁止)
Definition GxBase.h:244
テクスチャクラス
Definition GxRenderTexture.h:19
リソース基底クラス
Definition GxResBase.h:23
テクスチャリソース
Definition GxResTexture.h:23
2D基礎ユニットクラス
Definition GxUnit2DBase.h:24
2D画像ユニット基礎クラス
Definition GxUnit2DImageBase.h:18
GX_FORCE_INLINE void getTextureResourceProperty(void *const pValue)
テクスチャリソース取得(プロパティ用)
Definition GxUnit2DImageBase.h:66
GX_FORCE_INLINE void setSamplerState(GxRenderSamplerState state)
サンプラステートを設定
Definition GxUnit2DImageBase.h:73
GX_FORCE_INLINE void setTextureResourceProperty(const void *const pValue)
テクスチャリソース設定(プロパティ用)
Definition GxUnit2DImageBase.h:68
constexpr GxResTexture * getTextureResource(void) const
テクスチャリソースを取得
Definition GxUnit2DImageBase.h:61
GxRenderSamplerState _samplerState
サンプラステート
Definition GxUnit2DImageBase.h:96
GX_FORCE_INLINE GxRenderSamplerState getSamplerState(void) const
サンプラステートを取得
Definition GxUnit2DImageBase.h:71
GxResTexture * _pResTexture
テクスチャリソース
Definition GxUnit2DImageBase.h:95
プリミティブマテリアル
Definition GxPrimitive.h:103
サンプラステート
Definition GxRender.h:1046
32bitブーリアン
Definition GxDefine.h:173