00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055
00056
00057
00058
00059
00060
00061
00062
00063
00064
00065
00066
00067
00068
00069
00070
00071
00072 #ifndef __FK_BASE_HEADER__
00073 #define __FK_BASE_HEADER__
00074
00075
00076 const int FK_MAJOR_VERSION = 2;
00077 const int FK_MINOR_VERSION = 8;
00078 const int FK_SUBMINOR_VERSION = 8;
00079
00080 #include <stdio.h>
00081 #include <string.h>
00082 #include <stdlib.h>
00083 #include <time.h>
00084 #include <math.h>
00085 #include <fstream>
00086 #include <iostream>
00087 #include <string>
00088
00089 #if !defined(WIN32) || defined(_CYGWIN_GCC_) || defined(_MINGW_)
00090
00091 #include <sys/unistd.h>
00092 #include <sys/time.h>
00093
00094 #else
00095
00096 #pragma warning(disable : 4786)
00097 #define snprintf _snprintf
00098 #define vsnprintf _vsnprintf
00099
00100 #endif // !WIN32 || _CYGWIN_GCC_
00101
00102 const int FK_UNDEFINED = -1;
00103
00104 const double FK_EPS = 1.0e-8;
00105 const double FK_PI = 3.1415926535897932;
00106
00108 enum fk_ObjectType {
00109 FK_BASEOBJECT,
00110 FK_MATRIXADMIN,
00111 FK_MODEL,
00112 FK_DISPLAYLINK,
00113 FK_SCENE,
00114 FK_SHAPE,
00115 FK_POLYGON,
00116 FK_LINE,
00117 FK_POLYLINE,
00118 FK_POINT,
00119 FK_CIRCLE,
00120 FK_SPHERE,
00121 FK_BLOCK,
00122 FK_CLOSEDLINE,
00123 FK_PRISM,
00124 FK_CONE,
00125 FK_INDEXFACESET,
00126 FK_LIGHT,
00127 FK_BEZCURVE,
00128 FK_BSPLCURVE,
00129 FK_IMAGE,
00130 FK_TEXCOORD,
00131 FK_TEXTURE,
00132 FK_RECTTEXTURE,
00133 FK_TRITEXTURE,
00134 FK_MESHTEXTURE,
00135 FK_IFSTEXTURE,
00136 FK_UNICHAR,
00137 FK_UNISTR,
00138 FK_TEXTIMAGE,
00139 FK_COLOR,
00140 FK_MATERIAL,
00141 FK_PALETTE,
00142 FK_PLANE,
00143 FK_WINDOW,
00144 FK_PICKDATA,
00145 FK_PROJECTBASE,
00146 FK_PERSPECTIVE,
00147 FK_FRUSTUM,
00148 FK_ORTHO,
00149 FK_VERTEX,
00150 FK_HALF,
00151 FK_EDGE,
00152 FK_LOOP,
00153 FK_SOLID,
00154 FK_SHAPEVIEWER,
00155 FK_PARTICLE,
00156 FK_PARTICLESET
00157 };
00158
00159 #ifndef FK_DOXYGEN_USER_PROCESS
00160
00161 #ifdef NO_GL_LIBRARY
00162
00163 enum GLenum {
00164 GL_COLOR_INDEX,
00165 GL_STENCIL_INDEX,
00166 GL_DEPTH_INDEX,
00167 GL_RED,
00168 GL_GREEN,
00169 GL_BLUE,
00170 GL_ALPHA,
00171 GL_LUMINANCE,
00172 GL_LUMINANCE_ALPHA,
00173 GL_RGB,
00174 GL_BGR,
00175 GL_RGBA,
00176 GL_BGRA,
00177 GL_ABGR_EXT,
00178 GL_UNSIGNED_BYTE,
00179 GL_BYTE,
00180 GL_UNSIGNED_SHORT,
00181 GL_SHORT,
00182 GL_UNSIGNED_INT,
00183 GL_INT,
00184 GL_FLOAT,
00185 GL_BITMAP
00186 };
00187
00188 typedef int GLint;
00189 typedef unsigned int GLuint;
00190 typedef float GLfloat;
00191
00192 #endif
00193
00194 #endif
00195
00197
00202 class fk_BaseObject {
00203
00204 private:
00205
00206 fk_ObjectType ObjectType;
00207
00208 public:
00209
00211
00214 fk_BaseObject(fk_ObjectType type = FK_BASEOBJECT);
00215
00217
00221 fk_ObjectType getObjectType(void) const;
00222
00223 #ifndef FK_DOXYGEN_USER_PROCESS
00224 void SetObjectType(const fk_ObjectType type);
00225 #endif
00226
00227 };
00228
00229 #ifdef FK_DEF_STD_NAMESPACE
00230 using namespace std;
00231 #endif
00232
00233 #endif