WindowManager.hh
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2012-2015 Open Source Robotics Foundation
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  *
16 */
17 #ifndef _WINDOWMANAGER_HH_
18 #define _WINDOWMANAGER_HH_
19 
20 #ifdef _WIN32
21  // Oh, yeah, CreateWindow is taken, too.
22  #include <windows.h>
23  #undef CreateWindow
24 #endif
25 
26 #include <string>
27 #include <vector>
28 
30 #include "gazebo/util/system.hh"
31 
32 namespace Ogre
33 {
34  class RenderWindow;
35 }
36 
37 namespace gazebo
38 {
39  namespace rendering
40  {
43 
47  {
49  public: WindowManager();
50 
52  public: virtual ~WindowManager();
53 
55  public: void Fini();
56 
61  public: int CreateWindow(const std::string &_ogreHandle,
62  uint32_t _width,
63  uint32_t _height);
64 
68  public: void SetCamera(int _windowId, CameraPtr _camera);
69 
74  public: void Resize(uint32_t _id, int _width, int _height);
75 
78  public: void Moved(uint32_t _id);
79 
83  public: float GetAvgFPS(uint32_t _id);
84 
88  public: uint32_t GetTriangleCount(uint32_t _id);
89 
93  public: Ogre::RenderWindow *GetWindow(uint32_t _id);
94 
96  private: std::vector<Ogre::RenderWindow *> windows;
97 
99  private: static uint32_t windowCounter;
100  };
102  }
103 }
104 #endif
105 
106 
Class to mangage render windows.
Definition: WindowManager.hh:46
boost::shared_ptr< Camera > CameraPtr
Definition: RenderTypes.hh:87
#define GZ_RENDERING_VISIBLE
Definition: system.hh:241