00001 00012 #ifndef __GLOBAL_H__ 00013 #define __GLOBAL_H__ 00014 00015 #include <limits.h> 00016 00020 #define NDEBUG 00021 00025 //#define CLASSIC_MODE 00026 00031 #define FILL_SOLIDS 00032 00036 //#define ALGORITHM_ISIN 00037 00041 //#define ALGORITHM_CHECK_DET 00042 00047 //#define CHK_CP_ONLY 00048 00055 //#define EXTRACT_PART 00056 00062 //#define CCW_CHECK 00063 00068 //#define COMB_SCAN_LINE 00069 00076 //#define SAVED_FILL 00077 00082 #define USE_QUEUE 00083 00092 //#define MARK_BORDER 00093 00100 //#define LIMITED_STACK 00101 00105 #define RAY_METHODE 00106 00115 #define MAX_RECURSIVE_DEEP 65000 00116 00121 #define VEC_ABS_MAX 0.75 00122 00127 #define DET_MAX 0.5 00128 00132 #define DIMENSIONS 3 00133 00139 #define COUNT_VERTEX_IN_FACE 4 00140 00147 #define ABSOLUTE_MAX_DEPTH ( (8*sizeof(int) - 1) / 2 ) 00148 00153 #define EPSILON 1e-8 00154 00158 #define MAX(x1, x2) ((x1) > (x2) ? (x1) : (x2)) 00159 00163 #define MIN(x1, x2) ((x1) < (x2) ? (x1) : (x2)) 00164 00168 #define STR_LEN 1024 00169 00175 #define RAY_AXIS X_AXIS 00176 00181 #define RAY_DIR FORWARD 00182 00186 typedef double Coordinate; 00187 00191 typedef int Axis; 00192 00193 #ifdef COMB_SCAN_LINE 00194 00197 typedef int AxComb; 00198 #endif 00199 00203 const Axis X_AXIS= 0; 00204 00208 const Axis Y_AXIS= 1; 00209 00213 const Axis Z_AXIS= 2; 00214 00223 typedef int Hight; 00224 00228 const Hight MAX_HIGHT= ABSOLUTE_MAX_DEPTH; 00229 00233 typedef int Color; 00234 00238 const Color MAX_COLOR= INT_MAX - 1; 00239 00245 Coordinate ABS(Coordinate x); 00246 00250 bool EQUIVAL(Coordinate coord1, Coordinate coord2); 00251 00258 int SIGN(Coordinate x); 00259 00265 char* formatLarge(unsigned i); 00266 00267 #endif // ! __GLOBAL_H__