OgreHapticsPrerequisites.h

Go to the documentation of this file.
00001 /*
00002 This source file is part of OgreHaptics
00003  (a library for wrapping haptics devices for use with the open-source
00004  graphics engine OGRE, http://www.ogre3d.org)
00005 
00006 Copyright (c) 2006 - 2008 Jorrit de Vries
00007 Also see acknowledgements in Readme.html
00008 
00009 This library is free software; you can redistribute it and/or
00010 modify it under the terms of the GNU Lesser General Public License
00011 as published by the Free Software Foundation; either version 2.1
00012 of the License, or (at your option) any later version.
00013 
00014 This library is distributed in the hope that it will be useful,
00015 but WITHOUT ANY WARRANTY; without even the implied warranty of
00016 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
00017 GNU Lesser General Public License for more details.
00018 
00019 You should have received a copy of the GNU Lesser General Public
00020 License along with this library; if not, write to the
00021 Free Software Foundation, Inc.,
00022 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 
00023 */
00024 #ifndef _OgreHapticsPrerequisites_H__
00025 #define _OgreHapticsPrerequisites_H__
00026 
00027 /*
00028 This file contains platform specific settings as well as forward declarations
00029 for necessary files. Since multiple OGRE classes and files are needed, this
00030 file includes Ogre.h.
00031 */
00032 
00033 // Include Ogre
00034 #include <Ogre.h>
00035 using namespace Ogre;
00036 
00037 // Windows settings
00038 #if OGRE_PLATFORM == OGRE_PLATFORM_WIN32
00039 // If we are not including this from a build specify the stuff that should get
00040 // exported
00041 // Otherwise, import it
00042 #   if defined(__MINGW32__)
00043         // Linux compilers don't have symbol import/export directives
00044 #       define _OgreHapticsExport
00045 #       define _OgreHapticsPrivate
00046 #   else
00047 #       if defined(OGREHAPTICS_NONCLIENT_BUILD)
00048 #           define _OgreHapticsExport __declspec(dllexport)
00049 #       else
00050 #           define _OgreHapticsExport __declspec(dllimport)
00051 #       endif
00052 #       define _OgreHapticsPrivate
00053 #   endif
00054 #endif
00055 
00056 // Linux/Apple settings
00057 #if OGRE_PLATFORM == OGRE_PLATFORM_LINUX || OGRE_PLATFORM == OGRE_PLATFORM_APPLE
00058 #error Currently OgreHaptics only supports the Win32 platform.
00059 // Enable GCC 4.0 visibility
00060 #   if OGRE_COMP_VER >= 400
00061 #       define _OgreHapticsExport __attribute__ ((visibility("default")))
00062 #       define _OgreHapticsPrivate __attribute__ ((visibility("hidden")))
00063 #   else
00064 #       define _OgreHapticsExport
00065 #       define _OgreHapticsPrivate
00066 #   endif
00067 #endif
00068 
00069 #include "OgreHapticsConfig.h"
00070 #include <boost/thread/recursive_mutex.hpp>
00071 
00072 namespace OgreHaptics {
00073     // Define version
00074     #define OGREHAPTICS_VERSION_MAJOR 0
00075     #define OGREHAPTICS_VERSION_MINOR 2
00076     #define OGREHAPTICS_VERSION_PATCH 0
00077     #define OGREHAPTICS_VERSION_SUFFIX "a"
00078     #define OGREHAPTICS_VERSION_NAME "Cyta"
00079     #define OGREHAPTICS_VERSION ((OGREHAPTICS_VERSION_MAJOR << 16) | (OGREHAPTICS_VERSION_MINOR << 8) | OGREHAPTICS_VERSION_PATCH)
00080 
00081     // Threading definitions
00082     #define OGREHAPTICS_AUTO_MUTEX_NAME mutex
00083     #define OGREHAPTICS_AUTO_MUTEX mutable boost::recursive_mutex OGREHAPTICS_AUTO_MUTEX_NAME;
00084     #define OGREHAPTICS_LOCK_AUTO_MUTEX boost::recursive_mutex::scoped_lock ogreHapticsAutoMutexLock(OGREHAPTICS_AUTO_MUTEX_NAME);
00085     #define OGREHAPTICS_MUTEX(name) mutable boost::recursive_mutex name;
00086     #define OGREHAPTICS_LOCK_MUTEX(name) boost::recursive_mutex::scoped_lock ogreHapticsNameLock(name);
00087 
00088     // Forward declarations
00089     class DebugRenderer;
00090     class Device;
00091     class DeviceEvent;
00092     class DeviceListener;
00093     struct DeviceInitInfo;
00094     struct DeviceState;
00095     class EventArgs;
00096     class ForceEffect;
00097     class ForceEffectAlgorithm;
00098     class ForceEffectAlgorithmFactory;
00099     class ForceEffectManager;
00100     class ForceOutput;
00101     struct FrameEvent;
00102     class FrameListener;
00103     class RenderSystem;
00104     class System;
00105     class Timer;
00106 }
00107 
00108 #endif

Last modified Tue Jan 6 22:31:25 2009