FineKernelToolKit  2.9.0
 全て クラス ネームスペース ファイル 関数 変数 型定義 列挙型 列挙型の値 フレンド マクロ定義 ページ
Fog.h
説明を見る。
1 /****************************************************************************
2  *
3  * Copyright (c) 1999-2014, Fine Kernel Project, All rights reserved.
4  *
5  * Redistribution and use in source and binary forms,
6  * with or without modification, are permitted provided that the
7  * following conditions are met:
8  *
9  * - Redistributions of source code must retain the above
10  * copyright notice, this list of conditions and the
11  * following disclaimer.
12  *
13  * - Redistributions in binary form must reproduce the above
14  * copyright notice, this list of conditions and the
15  * following disclaimer in the documentation and/or
16  * other materials provided with the distribution.
17  *
18  * - Neither the name of the copyright holders nor the names
19  * of its contributors may be used to endorse or promote
20  * products derived from this software without specific
21  * prior written permission.
22  *
23  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
24  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
25  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
26  * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
27  * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
28  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
29  * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
30  * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
31  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
32  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
33  * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
34  * POSSIBILITY OF SUCH DAMAGE.
35  *
36  ****************************************************************************/
37 /****************************************************************************
38  *
39  * Copyright (c) 1999-2014, Fine Kernel Project, All rights reserved.
40  *
41  * 本ソフトウェアおよびソースコードのライセンスは、基本的に
42  * 「修正 BSD ライセンス」に従います。以下にその詳細を記します。
43  *
44  * ソースコード形式かバイナリ形式か、変更するかしないかを問わず、
45  * 以下の条件を満たす場合に限り、再頒布および使用が許可されます。
46  *
47  * - ソースコードを再頒布する場合、上記の著作権表示、本条件一覧、
48  * および下記免責条項を含めること。
49  *
50  * - バイナリ形式で再頒布する場合、頒布物に付属のドキュメント等の
51  * 資料に、上記の著作権表示、本条件一覧、および下記免責条項を
52  * 含めること。
53  *
54  * - 書面による特別の許可なしに、本ソフトウェアから派生した製品の
55  * 宣伝または販売促進に、本ソフトウェアの著作権者の名前または
56  * コントリビューターの名前を使用してはならない。
57  *
58  * 本ソフトウェアは、著作権者およびコントリビューターによって「現
59  * 状のまま」提供されており、明示黙示を問わず、商業的な使用可能性、
60  * および特定の目的に対する適合性に関す暗黙の保証も含め、またそれ
61  * に限定されない、いかなる保証もないものとします。著作権者もコン
62  * トリビューターも、事由のいかんを問わず、損害発生の原因いかんを
63  * 問わず、かつ責任の根拠が契約であるか厳格責任であるか(過失その
64  * 他の)不法行為であるかを問わず、仮にそのような損害が発生する可
65  * 能性を知らされていたとしても、本ソフトウェアの使用によって発生
66  * した(代替品または代用サービスの調達、使用の喪失、データの喪失、
67  * 利益の喪失、業務の中断も含め、またそれに限定されない)直接損害、
68  * 間接損害、偶発的な損害、特別損害、懲罰的損害、または結果損害に
69  * ついて、一切責任を負わないものとします。
70  *
71  ****************************************************************************/
72 #ifndef __FK_FOG_HEADER__
73 #define __FK_FOG_HEADER__
74 
75 #include <FK/Material.h>
76 
78 enum fk_FogMode {
83 };
84 
90 };
91 
93 
101 class fk_Fog {
102 
103  friend class fk_Window;
104  friend class fk_GraphicsEngine;
105 
106  private:
107 
108  fk_FogMode fogMode;
109  fk_FogOption fogOption;
110  double fogStart, fogEnd, fogDensity;
111  bool fogChangeStatus;
112  fk_Color fogColor;
113 
114  bool GetFogChangeStatus(void);
115  public:
116 
118  fk_Fog(void);
120  virtual ~fk_Fog();
121 
123 
152  void setFogMode(const fk_FogMode mode);
153 
155 
171  void setFogOption(const fk_FogOption opt);
172 
174 
181  void setFogDensity(const double d);
182 
184 
194  void setFogLinearMap(const double S, const double E);
195 
197 
204  void setFogColor(const fk_Color col);
205 
207 
218  void setFogColor(const float r, const float g,
219  const float b, const float a);
220 
222 
232  void setFogColor(const double r, const double g,
233  const double b, const double a);
234 
236 
242  fk_FogMode getFogMode(void) const;
243 
245 
251  fk_FogOption getFogOption(void) const;
252 
254 
261  double getFogDensity(void) const;
262 
264 
271  double getFogLinearStart(void) const;
272 
274 
281  double getFogLinearEnd(void) const;
282 
284 
289  fk_Color getFogColor(void) const;
290 };
291 
292 #endif // !__FK_FOG_HEADER__
質優先
Definition: Fog.h:88
void setFogOption(const fk_FogOption opt)
霧効果処理オプション設定関数
fk_FogMode getFogMode(void) const
減衰関数取得関数
void setFogLinearMap(const double S, const double E)
線形式係数設定関数
速度優先
Definition: Fog.h:87
指定なし
Definition: Fog.h:89
線形式
Definition: Fog.h:79
fk_FogOption getFogOption(void) const
霧効果処理オプション取得関数
指数式
Definition: Fog.h:80
RGB色を管理するクラス
Definition: Material.h:92
void setFogColor(const fk_Color col)
霧色設定関数1
fk_FogOption
霧効果のオプションを表す列挙型
Definition: Fog.h:86
void setFogMode(const fk_FogMode mode)
減衰関数設定関数
指数(2乗)式
Definition: Fog.h:81
friend class fk_GraphicsEngine
Definition: Fog.h:104
fk_Fog(void)
コンストラクタ
double getFogLinearEnd(void) const
線形式係数取得関数1
fk_Color getFogColor(void) const
霧色取得関数
double getFogDensity(void) const
指数式係数取得関数
void setFogDensity(const double d)
指数式係数設定関数
FLTK 用シーン描画ウィジェットクラス
Definition: Window.h:189
シーン中の霧効果を制御するクラス
Definition: Fog.h:101
fk_FogMode
霧効果の減衰関数を表す列挙型
Definition: Fog.h:78
double getFogLinearStart(void) const
線形式係数取得関数1
無効
Definition: Fog.h:82
virtual ~fk_Fog()
デストラクタ