OROCHI
 
Loading...
Searching...
No Matches
GxUnitLightProbe.h
Go to the documentation of this file.
1//===========================================================================
9//===========================================================================
10#pragma once
11
12GX_SHADER_NAMESPACE_BEGIN()
13
14//===========================================================================
16//===========================================================================
18{
19 //-----------------------------------------------------------
21 //-----------------------------------------------------------
23public:
24 // RTTI定義
25 GX_RTTI_CLASS_NAME_ICON(GxUnitLightProbe, GxUnitLocate, "ライトプローブ", GxRtti::ICON_TYPE::MATERIAL)
26 // ClassBaseReference継承クラス用禁止宣言
28private:
30 static constexpr u32 INITIAL_COUNT = 5;
31
33 //-----------------------------------------------------------
35 //-----------------------------------------------------------
37public:
39 GxUnitLightProbe(void);
41 void cleanup(void) override;
42
44 //-----------------------------------------------------------
46 //-----------------------------------------------------------
48protected:
50 b32 setup(void) override;
52 void forceAsyncUpdate(void) override;
53#if GX_DEVELOP
55 void developRender(void) override;
56private:
58 void createPositions(void);
59#endif //GX_DEVELOP
60
62 //-----------------------------------------------------------
64 //-----------------------------------------------------------
66public:
68 GxVector3 getProbePosition(u32 index) const;
70 constexpr u32 getProbeIndex(u32 indexX, u32 indexY, u32 indexZ) const { return indexX * _countY * _countZ + indexY * _countZ + indexZ; }
72 constexpr u32 getProbeCount(void) const { return _countX * _countY * _countZ; }
74 constexpr u32 getProbeCountX(void) const { return _countX; }
76 constexpr u32 getProbeCountY(void) const { return _countY; }
78 constexpr u32 getProbeCountZ(void) const { return _countZ; }
80 b32 isInclude(const GxVector3& position) const;
82 void getExtent(GxVector3& extent) const;
83#if GX_DEVELOP
85 GX_FORCE_INLINE void setSelect(u32 index) { _pSelectedIndices[index] = true; }
86#endif //GX_DEVELOP
87
89 //-----------------------------------------------------------
91 //-----------------------------------------------------------
93private:
94 GxVector3 _extent;
95 u32 _countX;
96 u32 _countY;
97 u32 _countZ;
98#if GX_DEVELOP
99 u32 _allocateCount;
100 b32* _pSelectedIndices;
101#endif //GX_DEVELOP
102
104};
105
106GX_SHADER_NAMESPACE_END()
#define GX_PROHIBIT_CLASS_BASE_REFERENCE(__CLASS__)
GxClassBaseReference継承の禁止宣言(new以外の生成禁止 + コピー禁止)
Definition GxBase.h:244
@ MATERIAL
マテリアル
ライトプローブクラス
Definition GxUnitLightProbe.h:18
constexpr u32 getProbeCountZ(void) const
Z軸のプローブの数を取得
Definition GxUnitLightProbe.h:78
constexpr u32 getProbeIndex(u32 indexX, u32 indexY, u32 indexZ) const
プローブのインデックスを取得
Definition GxUnitLightProbe.h:70
constexpr u32 getProbeCountX(void) const
X軸のプローブの数を取得
Definition GxUnitLightProbe.h:74
constexpr u32 getProbeCount(void) const
プローブの数を取得
Definition GxUnitLightProbe.h:72
constexpr u32 getProbeCountY(void) const
Y軸のプローブの数を取得
Definition GxUnitLightProbe.h:76
座標ユニット基礎クラス
Definition GxUnitLocate.h:23
3次元ベクトル
Definition GxVector.h:245
32bitブーリアン
Definition GxDefine.h:173