WindowManager.hh
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2012 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 _GAZEBO_RENDERING_WINDOWMANAGER_HH_
18 #define _GAZEBO_RENDERING_WINDOWMANAGER_HH_
19 
20 #ifdef _WIN32
21  // Oh, yeah, CreateWindow is taken, too.
22  #undef CreateWindow
23 #endif
24 
25 #include <memory>
26 #include <string>
27 
29 #include "gazebo/util/system.hh"
30 
31 namespace Ogre
32 {
33  class RenderWindow;
34 }
35 
36 namespace gazebo
37 {
38  namespace rendering
39  {
40  // Forward declare private data.
41  class WindowManagerPrivate;
42 
45 
48  class GZ_RENDERING_VISIBLE WindowManager
49  {
51  public: WindowManager();
52 
54  public: virtual ~WindowManager();
55 
57  public: void Fini();
58 
64  public: int CreateWindow(const std::string &_ogreHandle,
65  uint32_t _width,
66  uint32_t _height,
67  const double _devicePixelRatio = 1.0);
68 
72  public: void SetCamera(int _windowId, CameraPtr _camera);
73 
78  public: void Resize(uint32_t _id, int _width, int _height);
79 
82  public: void Moved(uint32_t _id);
83 
87  public: float AvgFPS(const uint32_t _id) const;
88 
92  public: uint32_t TriangleCount(const uint32_t _id) const;
93 
97  public: Ogre::RenderWindow *Window(const uint32_t _id) const;
98 
101  private: std::unique_ptr<WindowManagerPrivate> dataPtr;
102  };
104  }
105 }
106 #endif
Forward declarations for the common classes.
Definition: Animation.hh:26
Class to mangage render windows.
Definition: WindowManager.hh:48
rendering
Definition: RenderEngine.hh:31
Definition: JointMaker.hh:39
boost::shared_ptr< Camera > CameraPtr
Definition: RenderTypes.hh:90