Main Page | Class Hierarchy | Class List | File List | Class Members | File Members

UI_types.h

Go to the documentation of this file.
00001 
00016 #ifndef UI_TYPES_H
00017 #define UI_TYPES_H
00018 
00019 #ifndef NULL
00020 #define NULL 0
00021 #endif
00022 
00023 #include <assert.h>
00024 
00025 #ifndef WIN32
00026 // for floor version of floattoint
00027 #include <math.h>
00028 #endif
00029 
00030 #ifdef WIN32
00031 // disable data conversion warnings for OpenGL
00032 #pragma warning(disable : 4224)
00033 #pragma warning(disable : 4244)
00034 #pragma warning(disable : 4305)
00035 // disable long class name warnings for STL
00036 #pragma warning(disable: 4786)
00037 #pragma warning(disable: 4788)
00038 #endif //win32
00039 
00040 #define true    1
00041 #define false   0
00042 
00043 // simple min and max
00044 #ifndef MIN
00045 #define MIN(x,y) ( (x) < (y) ? (x) : (y) )
00046 #endif
00047 #ifndef MAX
00048 #define MAX(x,y) ( (x) > (y) ? (x) : (y) )
00049 #endif
00050 
00051 #ifdef WIN32
00052 // From NVIDIA's fastmath.cpp
00053 // http://www.nvidia.com/Marketing/Developer/DevRel.nsf/ProgrammingResourcesFrame?OpenPage
00054 __forceinline void FloatToInt(int *int_pointer, float f) 
00055 {
00056         __asm  fld  f
00057   __asm  mov  edx,int_pointer
00058   __asm  FRNDINT
00059   __asm  fistp dword ptr [edx];
00060 
00061 }
00062 #else
00063 #define FloatToInt(a,b) *a = (int) floor((b))
00064 #endif
00065 
00067 typedef float v2_f[2];
00069 typedef float v3_f[3];
00071 typedef float v4_f[4];
00073 typedef v2_f *v2_fp;
00075 typedef v4_f *v4_fp;
00076 
00078 typedef int v4_i[4];
00080 typedef v4_i *v4_ip;
00081 
00082 #endif

Generated on Mon Sep 29 23:07:02 2003 for glGUI by doxygen 1.3.4