FineKernelToolKit  2.9.0
 全て クラス ネームスペース ファイル 関数 変数 型定義 列挙型 列挙型の値 フレンド マクロ定義 ページ
Base.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_BASE_HEADER__
73 #define __FK_BASE_HEADER__
74 
75 
76 const int FK_MAJOR_VERSION = 2;
77 const int FK_MINOR_VERSION = 8;
78 const int FK_SUBMINOR_VERSION = 10;
79 
80 #if defined(_CYGWIN_GCC_)
81 #include <math.h>
82 #include <stdio.h>
83 #include <string>
84 #else
85 #include <stdio.h>
86 #include <string.h>
87 #include <stdlib.h>
88 #include <time.h>
89 #include <math.h>
90 #include <fstream>
91 #include <iostream>
92 #include <string>
93 
94 #if !defined(WIN32) || defined(_MINGW_)
95 
96 #include <sys/unistd.h>
97 #include <sys/types.h>
98 #include <sys/time.h>
99 
100 #else
101 
102 #pragma warning(disable : 4786)
103 #define snprintf _snprintf
104 #define vsnprintf _vsnprintf
105 
106 #endif // !WIN32 || _CYGWIN_GCC_
107 #endif
108 /* #endif */
109 
110 const int FK_UNDEFINED = -1;
111 
112 const double FK_EPS = 1.0e-8;
113 const double FK_PI = 3.1415926535897932;
114 
167 };
168 
169 #ifndef FK_DOXYGEN_USER_PROCESS
170 
171 #ifdef NO_GL_LIBRARY
172 
173 enum GLenum {
174  GL_COLOR_INDEX,
175  GL_STENCIL_INDEX,
176  GL_DEPTH_INDEX,
177  GL_RED,
178  GL_GREEN,
179  GL_BLUE,
180  GL_ALPHA,
181  GL_LUMINANCE,
182  GL_LUMINANCE_ALPHA,
183  GL_RGB,
184  GL_BGR,
185  GL_RGBA,
186  GL_BGRA,
187  GL_ABGR_EXT,
188  GL_UNSIGNED_BYTE,
189  GL_BYTE,
190  GL_UNSIGNED_SHORT,
191  GL_SHORT,
192  GL_UNSIGNED_INT,
193  GL_INT,
194  GL_FLOAT,
195  GL_BITMAP
196 };
197 
198 typedef int GLint;
199 typedef unsigned int GLuint;
200 typedef float GLfloat;
201 
202 #endif
203 
204 #endif
205 
207 
213 
214  private:
215 
216  fk_ObjectType ObjectType;
217 
218  public:
219 
221 
225 
227 
231  fk_ObjectType getObjectType(void) const;
232 
233 #ifndef FK_DOXYGEN_USER_PROCESS
234  void SetObjectType(const fk_ObjectType type);
235 #endif
236 
237 };
238 
239 #ifdef FK_DEF_STD_NAMESPACE
240 using namespace std;
241 #endif
242 
243 #ifdef FK_DEF_SIZETYPE
244 #include <vector>
245 typedef std::vector<int>::size_type _st;
246 #endif
247 
248 #ifndef FK_DOXYGEN_USER_PROCESS
249 class fk_Noncopyable {
250  public:
251  fk_Noncopyable(void) {};
252 
253  private:
254  void operator =(const fk_Noncopyable&) {};
255  fk_Noncopyable(const fk_Noncopyable&) {};
256 };
257 #endif
258 
259 #endif /* !__FK_BASE_HEADER__ */
fk_ObjectType getObjectType(void) const
タイプ取得関数
fk_Solid 型
Definition: Base.h:163
fk_MeshTexture 型
Definition: Base.h:144
fk_BSplSurface 型
Definition: Base.h:138
fk_ObjectType
オブジェクトインスタンスのタイプを表す列挙型
Definition: Base.h:116
fk_BezSurface 型
Definition: Base.h:137
fk_Block 型
Definition: Base.h:129
fk_PickData 型
Definition: Base.h:154
const double FK_PI
円周率
Definition: Base.h:113
fk_Line 型
Definition: Base.h:124
const int FK_UNDEFINED
Definition: Base.h:110
fk_BezCurve 型
Definition: Base.h:135
fk_MatrixAdmin 型
Definition: Base.h:118
fk_RectTexture 型
Definition: Base.h:142
fk_Shape 型
Definition: Base.h:122
fk_BSplCurve 型
Definition: Base.h:136
fk_ProjectBase 型
Definition: Base.h:155
fk_Plane 型
Definition: Base.h:152
fk_UniStr 型
Definition: Base.h:147
fk_Loop 型
Definition: Base.h:162
fk_TriTexture 型
Definition: Base.h:143
fk_Prism 型
Definition: Base.h:131
fk_DisplayLink 型
Definition: Base.h:120
fk_UniChar 型
Definition: Base.h:146
fk_Sphere 型
Definition: Base.h:128
fk_Ortho 型
Definition: Base.h:158
fk_IndexFaceSet 型
Definition: Base.h:133
fk_Perspective 型
Definition: Base.h:156
fk_Cone 型
Definition: Base.h:132
fk_Particle 型
Definition: Base.h:165
fk_ShapeViewer 型
Definition: Base.h:164
fk_Point 型
Definition: Base.h:126
fk_Polygon 型
Definition: Base.h:123
fk_Circle 型
Definition: Base.h:127
fk_Color 型
Definition: Base.h:149
fk_BaseObject(fk_ObjectType type=FK_BASEOBJECT)
コンストラクタ
const int FK_SUBMINOR_VERSION
Definition: Base.h:78
fk_Palette 型
Definition: Base.h:151
fk_IFSTexture 型
Definition: Base.h:145
FK の各クラスの基盤となる基本クラス
Definition: Base.h:212
fk_Model 型
Definition: Base.h:119
fk_Half 型
Definition: Base.h:160
fk_Edge 型
Definition: Base.h:161
fk_Frustum 型
Definition: Base.h:157
fk_BaseObject 型
Definition: Base.h:117
fk_Light 型
Definition: Base.h:134
fk_Window 型
Definition: Base.h:153
fk_Closedline 型
Definition: Base.h:130
const int FK_MAJOR_VERSION
Definition: Base.h:76
fk_TextImage 型
Definition: Base.h:148
const double FK_EPS
数値演算用誤差値
Definition: Base.h:112
fk_Scene 型
Definition: Base.h:121
fk_Vertex 型
Definition: Base.h:159
fk_Image 型
Definition: Base.h:139
fk_ParticleSet 型
Definition: Base.h:166
fk_Texture 型
Definition: Base.h:141
fk_TexCoord 型
Definition: Base.h:140
fk_Polyline 型
Definition: Base.h:125
fk_Material 型
Definition: Base.h:150
const int FK_MINOR_VERSION
Definition: Base.h:77