##

WindowManager.hh
Go to the documentation of this file.
/*
* Copyright (C) 2012 Open Source Robotics Foundation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
#ifndef _GAZEBO_RENDERING_WINDOWMANAGER_HH_
#define _GAZEBO_RENDERING_WINDOWMANAGER_HH_
#ifdef _WIN32
// Oh, yeah, CreateWindow is taken, too.
#undef CreateWindow
#endif
#include <memory>
#include <string>
#include "gazebo/rendering/RenderTypes.hh"
#include "gazebo/util/system.hh"
namespace Ogre
{
class RenderWindow;
}
namespace gazebo
{
namespace rendering
{
// Forward declare private data.
class WindowManagerPrivate;
class GZ_RENDERING_VISIBLE WindowManager
{
public: WindowManager();
public: virtual ~WindowManager();
public: void Fini();
public: int CreateWindow(const std::string &_ogreHandle,
uint32_t _width,
uint32_t _height,
const double _devicePixelRatio = 1.0);
public: void SetCamera(int _windowId, CameraPtr _camera);
public: void Resize(uint32_t _id, int _width, int _height);
public: void Moved(uint32_t _id);
public: float AvgFPS(const uint32_t _id) const;
public: uint32_t TriangleCount(const uint32_t _id) const;
public: Ogre::RenderWindow *Window(const uint32_t _id) const;
private: std::unique_ptr<WindowManagerPrivate> dataPtr;
};
}
}
#endif
Ogre
Definition: JointMaker.hh:39
gazebo
Forward declarations for the common classes.
Definition: Animation.hh:26
gazebo::rendering::WindowManager::AvgFPS
float AvgFPS(const uint32_t _id) const
Get the average FPS.
gazebo::rendering::WindowManager::Moved
void Moved(uint32_t _id)
Tells Ogre the window has moved, and needs updating.
system.hh
gazebo::rendering::WindowManager::TriangleCount
uint32_t TriangleCount(const uint32_t _id) const
Get the triangle count.
gazebo::rendering::WindowManager::WindowManager
WindowManager()
Constructor.
RenderTypes.hh
rendering
rendering
Definition: RenderEngine.hh:31
gazebo::rendering::WindowManager::Window
Ogre::RenderWindow * Window(const uint32_t _id) const
Get the render window associated with the given id.
gazebo::rendering::WindowManager::~WindowManager
virtual ~WindowManager()
Destructor.
gazebo::rendering::WindowManager::Resize
void Resize(uint32_t _id, int _width, int _height)
Resize a window.
gazebo::rendering::WindowManager::Fini
void Fini()
Shutdown all the windows.
gazebo::rendering::WindowManager
Class to mangage render windows.
Definition: WindowManager.hh:48
gazebo::rendering::CameraPtr
boost::shared_ptr< Camera > CameraPtr
Definition: RenderTypes.hh:90
gazebo::rendering::WindowManager::CreateWindow
int CreateWindow(const std::string &_ogreHandle, uint32_t _width, uint32_t _height, const double _devicePixelRatio=1.0)
Create a window.
gazebo::rendering::WindowManager::SetCamera
void SetCamera(int _windowId, CameraPtr _camera)
Attach a camera to a window.