#include <Viewport.hpp>
Public Member Functions | |
const std::string & | getName () const |
Get Viewport name. | |
const float | getLeft () const |
Get the left. | |
const float | getTop () const |
Get the top. | |
void | setPosition (const float top, const float left) |
Set the position. | |
const float | getWidth () const |
Get the width. | |
const float | getHeight () const |
Get the height. | |
void | setSize (const float width, const float height) |
Set the size. | |
void | setBackgroundColor (const float r, const float g, const float b) |
Set the background color. | |
void | setCamera (const std::string &name) |
Set the camera. | |
Private Member Functions | |
Viewport (const std::string &name, const int zOrder, const std::string cameraName) | |
Constructor. | |
~Viewport () | |
Destructor. | |
Private Attributes | |
Ogre::SceneManager * | m_pRenderSceneManager |
Ogre scene manager to be used for rendering. | |
std::string | m_name |
Name of the viewport. | |
int | m_zOrder |
Z-order of the viewport. | |
Ogre::Viewport * | m_pViewport |
Viewport to use. | |
Friends | |
class | Scene |
It is a viewport used to display the content of the scene.
syBR::Game::Viewport::Viewport | ( | const std::string & | name, | |
const int | zOrder, | |||
const std::string | cameraName | |||
) | [private] |
Constructor.
name | Name of the camera | |
zOrder | Depth position of the viewport | |
cameraName | Camera used to render to the viewport |
syBR::Game::Viewport::~Viewport | ( | ) | [private] |
Destructor.
Release used resources.
const std::string & syBR::Game::Viewport::getName | ( | ) | const |
const float syBR::Game::Viewport::getLeft | ( | ) | const |
Get the left.
const float syBR::Game::Viewport::getTop | ( | ) | const |
Get the top.
void syBR::Game::Viewport::setPosition | ( | const float | top, | |
const float | left | |||
) |
Set the position.
top | Top position of the viewport on the rendering window (between 0.0 and 1.0) | |
left | Left position of the viewport on the rendering window (between 0.0 and 1.0) |
const float syBR::Game::Viewport::getWidth | ( | ) | const |
Get the width.
return Width of the viewport on the rendering window (between 0.0 and 1.0)
const float syBR::Game::Viewport::getHeight | ( | ) | const |
Get the height.
void syBR::Game::Viewport::setSize | ( | const float | width, | |
const float | height | |||
) |
Set the size.
width | Width of the viewport on the rendering window (between 0.0 and 1.0) | |
height | Height of the viewport on the rendering window (between 0.0 and 1.0) |
void syBR::Game::Viewport::setBackgroundColor | ( | const float | r, | |
const float | g, | |||
const float | b | |||
) |
Set the background color.
r | Red component of the background color to set (between 0.0 and 1.0) | |
g | Green component of the background color to set (between 0.0 and 1.0) | |
b | Blue component of the background color to set (between 0.0 and 1.0) |
void syBR::Game::Viewport::setCamera | ( | const std::string & | name | ) |
Set the camera.
name | Name of the camera to use to render to this viewport |
friend class Scene [friend] |
Ogre::SceneManager* syBR::Game::Viewport::m_pRenderSceneManager [private] |
Ogre scene manager to be used for rendering.
std::string syBR::Game::Viewport::m_name [private] |
Name of the viewport.
int syBR::Game::Viewport::m_zOrder [private] |
Z-order of the viewport.
Ogre::Viewport* syBR::Game::Viewport::m_pViewport [private] |
Viewport to use.
Copyright © 2008 by Sebastien Frippiat
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 License.
Last modified Tue Dec 30 17:57:34 2008