00001 #ifndef OMK_INP_DISTRIBUTEDCAMERALISTENER_H 00002 #define OMK_INP_DISTRIBUTEDCAMERALISTENER_H 00003 00004 #include "OMKInputs.h" 00005 #include "OMKSimulatedObject.h" 00006 #include "Ogre.h" 00007 #include "OMKTransform.h" 00008 #include "OIS/OIS.h" 00009 00010 namespace OMK 00011 { 00012 namespace Vis 00013 { 00014 class OgreVis ; 00015 } 00016 namespace Inp 00017 { 00018 00027 class OMKINPUTS_API DistributedCameraListener: 00028 public Ogre::FrameListener, 00029 public Ogre::WindowEventListener, 00030 public SimulatedObject 00031 { 00032 DECLARE_OBJECT_FACTORY( DistributedCameraListener ) ; 00033 00034 protected: 00035 00036 //Adjust mouse clipping area 00037 virtual void windowResized( Ogre::RenderWindow* rw ) ; 00038 00039 //Unattach OIS before window shutdown (very important under Linux) 00040 virtual void windowClosed( Ogre::RenderWindow* rw ) ; 00041 00042 virtual bool processUnbufferedKeyInput( const Ogre::FrameEvent& evt ) ; 00043 00044 virtual bool processUnbufferedMouseInput( const Ogre::FrameEvent& evt ) ; 00045 00046 // Override frameStarted event to process that (don't care about frameEnded) 00047 virtual bool frameStarted(const Ogre::FrameEvent& evt) ; 00048 00049 virtual void init() ; 00050 00051 virtual void finish() ; 00052 00053 virtual void compute() ; 00054 00055 void readConfigurationParameters() ; 00056 00057 Vis::OgreVis* _ogreVis ; 00058 Type::Transform _transform ; 00059 bool _updateTransform ; 00060 float _translationSpeed ; 00061 float _wheelTranslationSpeed ; 00062 float _rotationSpeed ; 00063 00064 //OIS Input devices 00065 OIS::InputManager* _inputManager ; 00066 OIS::Mouse* _mouse ; 00067 OIS::Keyboard* _keyboard ; 00068 } ; 00069 } // namespace Inp 00070 } // namespace OMK 00071 00072 #endif // OMK_INP_DISTRIBUTEDCAMERALISTENER_H
Documentation generated on Mon Jun 9 11:45:56 2008 |
Generated with doxygen by Dimitri van Heesch , 1997-2007 |