O3dManager.hpp

Go to the documentation of this file.
00001 /*
00002 SagaEngine library
00003 Copyright (c) 2002-2006 Skalden Studio AS
00004 
00005 This software is provided 'as-is', without any express or implied 
00006 warranty. In no event will the authors be held liable for any 
00007 damages arising from the use of this software.
00008 
00009 Permission is granted to distribute the library under the terms of the 
00010 Q Public License version 1.0. Be sure to read and understand the license
00011 before using the library. It should be included here, or you may read it
00012 at http://www.trolltech.com/products/qt/licenses/licensing/qpl
00013 
00014 The original version of this library can be located at:
00015 http://www.sagaengine.com/
00016 
00017 Rune Myrland
00018 rune@skalden.com
00019 */
00020 
00021 
00022 #ifndef o3d_area_O3dManager_hpp
00023 #define o3d_area_O3dManager_hpp
00024 
00025 #include "../thing/o3d_thing.hpp"
00026 #include "O3dAreaComponent.hpp"
00027 #include "O3dPre.hpp"
00028 #include "comp/node/RootComponent.hpp"
00029 #include <OgreFrameListener.h>
00030 #include <OgreOverlay.h>
00031 
00032 
00033 namespace se_ogre {
00034     class _SeOgreExport O3dManager 
00035         : public se_core::RootComponent, public Ogre::FrameListener {
00036     public:
00037         O3dManager();
00038         virtual ~O3dManager();
00039         void clear();
00040 
00041         // Ogre::FrameListener
00042         bool frameStarted(const Ogre::FrameEvent& evt);
00043         bool frameEnded(const Ogre::FrameEvent& evt);
00044         void moveCamera(float stepDelta);
00045 
00046         // Debug overlay
00047         void showDebugOverlay(bool show);
00048         void flipDebugOverlay();
00049 
00050         void step(long when) {}
00051 
00052         void setCentreAligned(bool flag) {
00053             isAreaGeomCentreAligned_ = flag;
00054         }
00055         bool isAreaGeomCentreAligned_;
00056 
00057         bool isShowingDebugInfo() {
00058             return isShowingDebugInfo_;
00059         }
00060 
00061         void showDebugInfo(bool state) {
00062             isShowingDebugInfo_ = state;
00063         }
00064 
00065         void setEditLights(bool flag);
00066         void setDebugText(const Ogre::String& s) {
00067             debugText_ = s;
00068         }
00069 
00070     protected: // Helper methods
00071         void updateStats(void);
00072 
00073     private:
00074         //
00075         bool isShowingDebugInfo_;
00076         bool shouldStop_;
00077         //
00078         Ogre::Overlay* debugOverlay_;
00079         Ogre::String debugText_;
00080         //
00081         long lastRenderClock_;
00082 
00083         Ogre::ColourValue ambientCache_;
00084         bool isEditLightsOn_;
00085     };
00086 
00087 }
00088 
00089 
00090 #endif

Home Page | SagaEngine trunk (updated nightly) reference generated Sun Dec 2 20:06:04 2007 by Doxygen version 1.3.9.1.

SourceForge.net Logo