D:/Papagan/490.2006/490.2006/korsan/Papagan/490.2006/korsan/Papagan/MyFrameListener.h

Go to the documentation of this file.
00001 #ifndef MYFRAMELISTENER_H
00002 #define MYFRAMELISTENER_H
00003 
00004 #include "Ogre.h"
00005 #include "OgreKeyEvent.h"
00006 #include "OgreEventListeners.h"
00007 #include "OgreStringConverter.h"
00008 #include "OgreException.h"
00009 
00010 #include <ctime>
00011 
00012 #include "Animation.h"
00013 
00014 using namespace Ogre;
00016 class MyFrameListener: public FrameListener, public KeyListener
00017 {
00018 
00019 public:
00020 
00021     MyFrameListener(RenderWindow* win, Camera* cam, bool useBufferedInputKeys = false, bool useBufferedInputMouse = false);
00022 
00023         virtual ~MyFrameListener(void);
00024 
00026         virtual bool processUnbufferedKeyInput(const FrameEvent& evt);
00027 
00029         bool processUnbufferedMouseInput(const FrameEvent& evt);
00030 
00031         void moveCamera(void);
00032 
00034         bool frameStarted(const FrameEvent& evt);
00035 
00037         bool frameEnded(const FrameEvent& evt);
00038 
00039         void switchMouseMode(void);
00040 
00041         void switchKeyMode(void);
00042 
00043         void keyClicked(KeyEvent* e);
00044 
00045         void keyPressed(KeyEvent* e);
00046 
00047         void keyReleased(KeyEvent* e);
00048 
00050         void setAnimation(PapaganAnimation* anAnimation);
00051 
00052         PapaganAnimation* getAnimation(void);
00053 
00055         String giveScreenShotName(void);
00056 
00057 
00058 protected:
00059 
00060     EventProcessor*             mEventProcessor;
00061 
00062     InputReader*                mInputDevice;
00063 
00064     Camera*                             mCamera;
00065 
00066         RenderWindow*           mWindow;
00067 
00068         PapaganAnimation*       mAnimation;
00069 
00070     Vector3 mTranslateVector;
00071 
00072     bool mStatsOn;
00073 
00074     bool mUseBufferedInputKeys, mUseBufferedInputMouse, mInputTypeSwitchingOn;
00075 
00076         unsigned int mNumScreenShots;
00077 
00078     float mMoveScale;
00079 
00080     Degree mRotScale;
00081     // just to stop toggles flipping too fast
00082     Real mTimeUntilNextToggle ;
00083     
00084         Radian mRotX, mRotY;
00085     
00086         TextureFilterOptions mFiltering;
00087     
00088         int mAniso;
00089 
00090         int mSceneDetailIndex ;
00091     
00092         Real mMoveSpeed;
00093     
00094         Degree mRotateSpeed;
00095 };
00096 
00097 #endif

Generated on Mon May 29 01:10:33 2006 for Papagan by  doxygen 1.4.6-NO