syBR::Game::Viewport Class Reference

Viewport actor class. More...

#include <Viewport.hpp>

List of all members.

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


Detailed Description

Viewport actor class.

It is a viewport used to display the content of the scene.


Constructor & Destructor Documentation

syBR::Game::Viewport::Viewport ( const std::string &  name,
const int  zOrder,
const std::string  cameraName 
) [private]

Constructor.

Parameters:
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.


Member Function Documentation

const std::string & syBR::Game::Viewport::getName (  )  const

Get Viewport name.

Returns:
Viewport name

const float syBR::Game::Viewport::getLeft (  )  const

Get the left.

Returns:
Left position of the viewport on the rendering window (between 0.0 and 1.0)

const float syBR::Game::Viewport::getTop (  )  const

Get the top.

Returns:
Top position of the viewport on the rendering window (between 0.0 and 1.0)

void syBR::Game::Viewport::setPosition ( const float  top,
const float  left 
)

Set the position.

Parameters:
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.

Returns:
Height of the viewport on the rendering window (between 0.0 and 1.0)

void syBR::Game::Viewport::setSize ( const float  width,
const float  height 
)

Set the size.

Parameters:
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.

Parameters:
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.

Parameters:
name Name of the camera to use to render to this viewport


Friends And Related Function Documentation

friend class Scene [friend]


Member Data Documentation

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.


The documentation for this class was generated from the following files:

Copyright © 2008 by Sebastien Frippiat
Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 License.
Last modified Tue Dec 30 17:57:34 2008