WindowManager.hh
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2012-2016 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  #include <windows.h>
23  #undef CreateWindow
24 #endif
25 
26 #include <memory>
27 #include <string>
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  {
41  // Forward declare private data.
42  class WindowManagerPrivate;
43 
46 
49  class GZ_RENDERING_VISIBLE WindowManager
50  {
52  public: WindowManager();
53 
55  public: virtual ~WindowManager();
56 
58  public: void Fini();
59 
64  public: int CreateWindow(const std::string &_ogreHandle,
65  uint32_t _width,
66  uint32_t _height);
67 
71  public: void SetCamera(int _windowId, CameraPtr _camera);
72 
77  public: void Resize(uint32_t _id, int _width, int _height);
78 
81  public: void Moved(uint32_t _id);
82 
87  public: float GetAvgFPS(uint32_t _id) GAZEBO_DEPRECATED(7.0);
88 
92  public: float AvgFPS(const uint32_t _id) const;
93 
98  public: uint32_t GetTriangleCount(uint32_t _id) GAZEBO_DEPRECATED(7.0);
99 
103  public: uint32_t TriangleCount(const uint32_t _id) const;
104 
109  public: Ogre::RenderWindow *GetWindow(uint32_t _id)
110  GAZEBO_DEPRECATED(7.0);
111 
115  public: Ogre::RenderWindow *Window(const uint32_t _id) const;
116 
119  private: std::unique_ptr<WindowManagerPrivate> dataPtr;
120  };
122  }
123 }
124 #endif
Forward declarations for the common classes.
Definition: Animation.hh:33
Class to mangage render windows.
Definition: WindowManager.hh:49
#define GAZEBO_DEPRECATED(version)
Definition: CommonTypes.hh:48
Definition: JointMaker.hh:41
boost::shared_ptr< Camera > CameraPtr
Definition: RenderTypes.hh:88