1 /* 2 This file is a part of the RepSnapper project. 3 Copyright (C) 2010 Kulitorum 4 5 This program is free software; you can redistribute it and/or modify 6 it under the terms of the GNU General Public License as published by 7 the Free Software Foundation; either version 2 of the License, or 8 (at your option) any later version. 9 10 This program is distributed in the hope that it will be useful, 11 but WITHOUT ANY WARRANTY; without even the implied warranty of 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 GNU General Public License for more details. 14 15 You should have received a copy of the GNU General Public License along 16 with this program; if not, write to the Free Software Foundation, Inc., 17 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 18 */ 19 20 // stdafx.h : include file for standard system include files, 21 // or project specific include files that are used frequently, but 22 // are changed infrequently 23 // 24 25 #ifndef STDAFX_H 26 #define STDAFX_H 27 28 #include "config.h" 29 30 #ifndef _WIN32_WINNT // Allow use of features specific to Windows XP or later. 31 #define _WIN32_WINNT 0x0501 // Change this to the appropriate value to target other versions of Windows. 32 #endif 33 34 #ifdef _MSC_VER // Visual C++ compiler 35 # pragma warning( disable : 4311 4312 4244 4267 4800) 36 #endif 37 38 typedef unsigned int uint; 39 40 #define DEBUG_ECHO (1<<0) 41 #define DEBUG_INFO (1<<1) 42 #define DEBUG_ERRORS (1<<2) 43 #ifdef WIN32 44 #include <windows.h> // Header File For Windows 45 #include <tchar.h> 46 #undef interface // Undo braindead define from Windows that conflicts with glibmm DBUS binding 47 typedef unsigned int guint; 48 #define random rand 49 #define srandom srand 50 #endif 51 #include "platform.h" // OpenGL, glu, glut in cross-platform way 52 #include <stdio.h> 53 #include <glib/gi18n.h> 54 #include <gtkmm.h> 55 #include "math.h" // Needed for sqrtf 56 #include "types.h" 57 58 #define VMMLIB_BASIC_ONLY 59 #include <vmmlib/vmmlib.hpp> 60 // Unpleasant needs un-winding ... 61 using namespace std; 62 //using namespace vmml; 63 64 typedef vmml::vec2d Vector2d; 65 typedef vmml::vec2f Vector2f; 66 typedef vmml::vec3d Vector3d; 67 typedef vmml::vec3f Vector3f; 68 typedef vmml::vec4d Vector4d; 69 typedef vmml::vec4f Vector4f; 70 typedef vmml::mat4d Matrix4d; 71 typedef vmml::mat4f Matrix4f; 72 typedef vmml::mat3d Matrix3d; 73 74 75 float const GREEN[] = {0.1, 1, 0.1}; 76 float const GREEN2[] = {0.3, 0.8, 0.3}; 77 float const BLUEGREEN[] = {0.1, 0.9, 0.7}; 78 float const BLUE2[] = {0.5,0.5,1.0}; 79 float const RED[] = {1, 0, 0}; 80 float const RED2[] = {0.8,0.5,0.5}; 81 float const RED3[] = {0.8,0.3,0.1}; 82 float const ORANGE[] = {1, 0.5, 0}; 83 float const YELLOW[] = {1, 1, 0}; 84 float const YELLOW2[] = {1, 1, 0.2}; 85 float const WHITE[] = {1, 1, 1}; 86 float const GREY[] = {0.5,0.5,0.5}; 87 float const VIOLET[] = {0.8,0.0,0.8}; 88 89 //utility macros 90 //assuming IEEE-754(GLfloat), which i believe has max precision of 7 bits 91 # define Epsilon 1.0e-5 92 93 #ifdef __GNUC__ 94 #define UNUSED __attribute__ ((unused)) 95 #else 96 #define UNUSED 97 #endif 98 99 const double UNUSED INFTY = numeric_limits<double>::infinity(); 100 101 #endif // STDAFX_H 102