00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef _OgreBulletApplication_H_
00018 #define _OgreBulletApplication_H_
00019
00020
00021 #include "OgreBulletCollisions.h"
00022 #include "OgreBulletDynamics.h"
00023
00024 #include "OgreBulletListener.h"
00025
00026 #include "ExampleApplication.h"
00027
00028 #include <vector>
00029
00030 #if !(OGRE_VERSION < ((1 << 16) | (3 << 8) | 0))
00031 using namespace OIS;
00032 #endif //OGRE_VERSION eihort
00033
00034
00035 class OgreBulletApplication;
00036
00037
00038
00039
00040
00041 class OgreBulletApplication: public ExampleApplication, public FrameListener
00042 {
00043 public:
00044
00045 OgreBulletApplication(std::vector <OgreBulletListener *> *bulletListeners);
00046 ~OgreBulletApplication();
00047
00048 std::vector <OgreBulletListener *> *getScenesList(){return mBulletListeners;};
00049
00050 protected:
00051
00052 void createScene(void){};
00053 void chooseSceneManager(void){};
00054 void createCamera(void){};
00055 void createViewports(void){};
00056
00057 void createFrameListener(void);
00058
00059 void setupResources(void);
00060 void loadResources(void);
00061
00062 bool frameStarted(const FrameEvent& evt);
00063 bool frameEnded(const FrameEvent& evt);
00064
00065 bool switchListener(OgreBulletListener *newListener);
00066
00067 protected:
00068 OgreBulletListener *mBulletListener;
00069 std::vector <OgreBulletListener *> *mBulletListeners;
00070
00071 #if (OGRE_VERSION < ((1 << 16) | (3 << 8) | 0))
00072 Ogre::InputReader *mInput;
00073 Ogre::EventProcessor *mInputSystem;
00074
00075 #else
00076 OIS::Keyboard *mInput;
00077 OIS::Mouse *mMouse;
00078 OIS::InputManager *mInputSystem;
00079
00080 #endif
00081
00082 };
00083
00084 #endif //_OgreBulletApplication_H_
00085