OgreAdaptor.hh
00001 
00002 
00003 
00004 
00005 
00006 
00007 
00008 
00009 
00010 
00011 
00012 
00013 
00014 
00015 
00016 
00017 
00018 
00019 
00020 
00021 
00022 
00023 
00024 
00025 
00026 
00027 #ifndef OGREADAPTOR
00028 #define OGREADAPTOR
00029 
00030 #include <X11/Xlib.h>
00031 #include <X11/Xutil.h>
00032 
00033 #include "SingletonT.hh"
00034 #include "Pose3d.hh"
00035 
00036 namespace Ogre
00037 {
00038   class Root;
00039   class SceneManager;
00040   class RenderWindow;
00041   class Viewport;
00042   class InputReader;
00043   class Window;
00044   class Camera;
00045   class SceneNode;
00046   class Node;
00047   class LogManager;
00048   class Overlay;
00049   class OverlayContainer;
00050   class SceneNode;
00051   class RenderTarget;
00052   class ColourValue;
00053   class RenderSystem;
00054 }
00055 
00056 namespace gazebo
00057 {
00060 
00061 
00062 class XMLConfigNode;
00063 class OgreFrameListener;
00064 class Entity;
00065 
00067 class OgreAdaptor : public SingletonT<OgreAdaptor>
00068 {
00069 
00071   private: OgreAdaptor();
00072 
00074   private: virtual ~OgreAdaptor();
00075 
00077   public: void Close();
00078 
00081   public: void Init(XMLConfigNode *rootNode);
00082 
00084   public: void Save(XMLConfigNode *node);
00085 
00087   public: void Init(Display *display, XVisualInfo *visual, Window windowId, int width, int height); 
00089   public: int Render();
00090 
00092   public: void ResizeWindow(unsigned int w, unsigned int h);
00093 
00094   private: void LoadPlugins();
00095   private: void SetupResources();
00096   private: void SetupRenderSystem(bool create);
00097   private: void CreateWindow();
00098 
00100   public: Ogre::Root *root;
00101 
00103   public: Ogre::SceneManager *sceneMgr;
00104 
00106   public: Ogre::RenderSystem *renderSys;
00107 
00109   public: Ogre::RenderWindow *window;
00110 
00112   public: Ogre::Camera *camera;
00113 
00115   public: Ogre::Viewport *viewport;
00116 
00118   public: Ogre::InputReader *inputDevice;
00119 
00120   private: Ogre::LogManager *logManager;
00121 
00122   
00123   private: OgreFrameListener *frameListener;
00124 
00125   public: Ogre::ColourValue *backgroundColor;
00126 
00127   private: std::string videoMode;
00128 
00129   private: bool ogreWindow;
00130   
00131   
00132   private: int sceneType;
00133   private: std::string worldGeometry;
00134 
00135   private: Vector3 terrainSize;
00136   private: unsigned int terrainVertSize;
00137   private: std::string terrainImage;
00138   
00139   private: friend class DestroyerT<OgreAdaptor>;
00140   private: friend class SingletonT<OgreAdaptor>;
00141 
00142 };
00143 
00144 
00145 
00146 
00147 
00148 
00149 
00150 
00151 
00152 
00153 
00154 
00155 
00156 
00158 
00159 }
00160 #endif