OROCHI
 
Loading...
Searching...
No Matches
GxUnitFog.h
Go to the documentation of this file.
1//===========================================================================
10//===========================================================================
11#pragma once
12
13GX_SHADER_NAMESPACE_BEGIN()
14
15//===========================================================================
17//===========================================================================
18class GxUnitFog : public GxUnitBase
19{
20 //-----------------------------------------------------------
22 //-----------------------------------------------------------
24public:
25 GX_RTTI_CLASS_NAME_ICON(GxUnitFog, GxUnitBase, "フォグ", GxRtti::ICON_TYPE::MATERIAL)
26 // ClassBaseReference継承クラス用禁止宣言
28
29
30 enum class FOG_TYPE
31 {
32 DISTANCE,
33 DISTANCE_WITH_WORLD_HEIGHT,
34 MAX,
35 };
36#if GX_DEVELOP
38 GX_ENUM_TABLE_MAX(FOG_TYPE)
39#endif //GX_DEVELOP
40
42 struct GxParameter : public GxStructBase
43 {
44 //-----------------------------------------------------------
46 //-----------------------------------------------------------
48
49 GX_RTTI_STRUCT(GxParameter)
50
51
52 //-----------------------------------------------------------
54 //-----------------------------------------------------------
56
59 : _enable(false)
60 , _enableLight(false)
61 , _type(FOG_TYPE::DISTANCE)
62 , _startDistance(1.0f)
63 , _endDistance(2000.0f)
64 , _startHeight(1.0f)
65 , _height(500.0f)
66 , _densityDistance(0.05f)
67 , _densityHeight(0.05f)
68 , _color(0.10f, 0.47f, 0.65f, 1.0f)
69 , _rayleighWeight(1.0f)
70 , _mieWeight(1.0f)
71 {}
72
74 //-----------------------------------------------------------
76 //-----------------------------------------------------------
78
85 f32 _height;
91
93 };
94
96 //-----------------------------------------------------------
98 //-----------------------------------------------------------
100public:
102 GxUnitFog(void);
103
105 void cleanup(void) override;
106
108 //-----------------------------------------------------------
110 //-----------------------------------------------------------
112protected:
114 void forceAsyncUpdate(void) override;
115
117 //-----------------------------------------------------------
119 //-----------------------------------------------------------
121public:
123 GX_FORCE_INLINE const GxParameter& getParameter(void) const { return _parameter; }
125 GX_FORCE_INLINE void setParameter(const GxParameter& parameter) { _parameter = parameter; }
126
128 //-----------------------------------------------------------
130 //-----------------------------------------------------------
132private:
133 GxParameter _parameter;
134
136};
137
138GX_SHADER_NAMESPACE_END()
#define GX_PROHIBIT_CLASS_BASE_REFERENCE(__CLASS__)
GxClassBaseReference継承の禁止宣言(new以外の生成禁止 + コピー禁止)
Definition GxBase.h:244
@ MAX
定義数
@ MATERIAL
マテリアル
ユニット基礎クラス
Definition GxUnitBase.h:45
フォグクラス
Definition GxUnitFog.h:19
GX_FORCE_INLINE const GxParameter & getParameter(void) const
パラメータを取得
Definition GxUnitFog.h:123
GX_FORCE_INLINE void setParameter(const GxParameter &parameter)
パラメータを設定
Definition GxUnitFog.h:125
FOG_TYPE
フォグタイプ
Definition GxUnitFog.h:31
色(HDR)
Definition GxColor.h:241
Definition GxBase.h:24
パラメータ構造体
Definition GxUnitFog.h:43
FOG_TYPE _type
タイプ
Definition GxUnitFog.h:81
f32 _startHeight
開始高さ
Definition GxUnitFog.h:84
f32 _startDistance
開始距離
Definition GxUnitFog.h:82
f32 _rayleighWeight
レイリー散乱係数
Definition GxUnitFog.h:89
f32 _mieWeight
ミー散乱係数
Definition GxUnitFog.h:90
f32 _densityDistance
距離密度
Definition GxUnitFog.h:86
b32 _enable
有効/無効
Definition GxUnitFog.h:79
f32 _height
高さ
Definition GxUnitFog.h:85
b32 _enableLight
ライトの影響有効/無効
Definition GxUnitFog.h:80
GxColorHDR _color
カラー
Definition GxUnitFog.h:88
f32 _densityHeight
高さ密度
Definition GxUnitFog.h:87
f32 _endDistance
終了距離
Definition GxUnitFog.h:83
32bitブーリアン
Definition GxDefine.h:173