H3DApi.h

Go to the documentation of this file.
00001 
00002 //    Copyright 2004, SenseGraphics AB
00003 //
00004 //    This file is part of H3D API.
00005 //
00006 //    H3D API is free software; you can redistribute it and/or modify
00007 //    it under the terms of the GNU General Public License as published by
00008 //    the Free Software Foundation; either version 2 of the License, or
00009 //    (at your option) any later version.
00010 //
00011 //    H3D API is distributed in the hope that it will be useful,
00012 //    but WITHOUT ANY WARRANTY; without even the implied warranty of
00013 //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014 //    GNU General Public License for more details.
00015 //
00016 //    You should have received a copy of the GNU General Public License
00017 //    along with H3D API; if not, write to the Free Software
00018 //    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00019 //
00020 //    A commercial license is also available. Please contact us at 
00021 //    www.sensegraphics.com for more information.
00022 //
00023 //
00024 //
00029 
00032 
00033 #ifndef __H3DApi_H__
00034 #define __H3DApi_H__
00035 
00038 #define HAVE_OPENHAPTICS
00039 
00042 #define USE_HAPTICS
00043 
00046 #define HAVE_OPENAL
00047 
00050 #define HAVE_LIBVORBIS
00051 
00054 #define HAVE_LIBAUDIOFILE
00055 
00059 #define HAVE_CG
00060 
00063 #define HAVE_FTGL
00064 
00067 #define HAVE_FREETYPE
00068 
00071 #ifdef WIN32
00072 #define HAVE_3DXWARE
00073 #endif
00074 
00077 #define HAVE_PYTHON
00078 
00081 #define HAVE_FREEIMAGE
00082 
00086 #define HAVE_LIBCURL
00087 
00090 #ifdef WIN32
00091 #define HAVE_DSHOW
00092 #endif
00093 
00097 #define HAVE_DHDAPI
00098 
00101 //#define HAVE_HAPTIK
00102 
00103 // The following ifdef block is the standard way of creating macros
00104 // which make exporting from a DLL simpler. All files within this DLL
00105 // are compiled with the H3DAPI_EXPORTS symbol defined on the command
00106 // line. this symbol should not be defined on any project that uses
00107 // this DLL. This way any other project whose source files include
00108 // this file see H3DAPI_API functions as being imported from a DLL,
00109 // whereas this DLL sees symbols defined with this macro as being
00110 // exported.
00111 #ifdef WIN32
00112 #include <windows.h>
00113 #ifdef H3DAPI_EXPORTS
00114 #define H3DAPI_API __declspec(dllexport)
00115 #else
00116 #define H3DAPI_API __declspec(dllimport)
00117 #endif
00118 #ifdef _MSC_VER
00119 // disable dll-interface warnings for stl-exports 
00120 #pragma warning( disable: 4251 )
00121 #endif
00122 
00123 
00124 #endif
00125 
00126 #if defined(__APPLE__) && defined(__MACH__)
00127 #define MACOSX
00128 #define H3DAPI_API
00129 #define HAVE_SYS_TIME_H
00130 #endif
00131 
00132 #if defined(__linux)
00133 #define LINUX
00134 #define H3DAPI_API 
00135 #define HAVE_SYS_TIME_H
00136 #endif
00137 
00138 
00139 namespace H3D {
00142   inline bool isLittleEndian() {
00143     union probe{ 
00144       unsigned int num;
00145       unsigned char bytes[sizeof(unsigned int)];
00146     };
00147     //initialize first member of p with unsigned 1
00148     probe p = { 1U };
00149     // in a big endian architecture, p.bytes[0] equals 0  
00150     bool little_endian = (p.bytes[0] == 1U); 
00151     return little_endian;
00152   }
00153 }
00154 
00155 #endif
00156 
00157 
00158 

Generated on Thu Aug 24 12:38:32 2006 for H3D API by  doxygen 1.4.5