This class is for creating and managing viewports within a game window. More...
#include <viewport.h>
Public Member Functions | |
Viewport (CameraProxy *ViewportCamera, const Integer &ZOrder, GameWindow *ParentWindow) | |
Class constructor. More... | |
~Viewport () | |
Class destructor. | |
Whole | GetActualHeight () const |
Gets the height of the viewport in pixels. More... | |
Whole | GetActualLeft () const |
Gets the left position of the viewport in pixels. More... | |
Whole | GetActualTop () const |
Gets the top position of the viewport in pixels. More... | |
Whole | GetActualWidth () const |
Gets the width of the viewport in pixels. More... | |
Real | GetHeight () const |
Gets the relative height of the viewport. More... | |
Real | GetLeft () const |
Gets the relative left position of the viewport. More... | |
Ogre::Viewport * | GetOgreViewport () const |
Gets the internal Ogre Viewport. More... | |
Mezzanine::OrientationMode | GetOrientationMode () const |
Gets the current Orientation of the viewport. More... | |
GameWindow * | GetParentWindow () const |
Gets the game window this viewport belongs to. More... | |
Real | GetTop () const |
Gets the relative top position of the viewport. More... | |
CameraProxy * | GetViewportCamera () const |
Gets the CameraProxy associated with this viewport. More... | |
Real | GetWidth () const |
Gets the relative width of the viewport. More... | |
Integer | GetZOrder () const |
Gets the Zorder assigned to this viewport. More... | |
void | SetCamera (CameraProxy *ViewportCamera) |
Sets which CameraProxy is bound to this viewport. More... | |
void | SetDimensions (const Vector2 &Position, const Vector2 &Size) |
Sets the position and size of this viewport within the game window. More... | |
void | SetDimensions (const Real &Left, const Real &Top, const Real &Width, const Real &Height) |
Sets the position and size of this viewport within the game window. More... | |
Protected Attributes | |
Ogre::Viewport * | OgreViewport |
A pointer to the internal viewport providing this classes functionality. More... | |
GameWindow * | Parent |
A pointer to the window that created this viewport. More... | |
CameraProxy * | ViewportCam |
A pointer to the camera being used to render this viewport, or NULL if one isn't set. More... | |
This class is for creating and managing viewports within a game window.
A game window can contain several veiwports, and veiwports can overlap. This is useful for editors mostly, but can be of use in games as well. Be careful about positioning Veiwports in a game window.
Definition at line 65 of file viewport.h.
Mezzanine::Graphics::Viewport::Viewport | ( | CameraProxy * | ViewportCamera, |
const Integer & | ZOrder, | ||
GameWindow * | ParentWindow | ||
) |
Class constructor.
ViewportCamera | The CameraProxy that is to be attached to this veiwport. |
ZOrder | The render order of this viewport relative to other viewports in the game window. |
ParentWindow | The game window this viewport belongs to. |
Definition at line 54 of file viewport.cpp.
Whole Mezzanine::Graphics::Viewport::GetActualHeight | ( | ) | const |
Gets the height of the viewport in pixels.
Definition at line 133 of file viewport.cpp.
Whole Mezzanine::Graphics::Viewport::GetActualLeft | ( | ) | const |
Gets the left position of the viewport in pixels.
Definition at line 124 of file viewport.cpp.
Whole Mezzanine::Graphics::Viewport::GetActualTop | ( | ) | const |
Gets the top position of the viewport in pixels.
Definition at line 127 of file viewport.cpp.
Whole Mezzanine::Graphics::Viewport::GetActualWidth | ( | ) | const |
Gets the width of the viewport in pixels.
Definition at line 130 of file viewport.cpp.
Real Mezzanine::Graphics::Viewport::GetHeight | ( | ) | const |
Gets the relative height of the viewport.
Definition at line 121 of file viewport.cpp.
Real Mezzanine::Graphics::Viewport::GetLeft | ( | ) | const |
Gets the relative left position of the viewport.
Definition at line 112 of file viewport.cpp.
Ogre::Viewport * Mezzanine::Graphics::Viewport::GetOgreViewport | ( | ) | const |
Mezzanine::OrientationMode Mezzanine::Graphics::Viewport::GetOrientationMode | ( | ) | const |
Gets the current Orientation of the viewport.
Definition at line 94 of file viewport.cpp.
GameWindow * Mezzanine::Graphics::Viewport::GetParentWindow | ( | ) | const |
Gets the game window this viewport belongs to.
Definition at line 85 of file viewport.cpp.
Real Mezzanine::Graphics::Viewport::GetTop | ( | ) | const |
Gets the relative top position of the viewport.
Definition at line 115 of file viewport.cpp.
CameraProxy * Mezzanine::Graphics::Viewport::GetViewportCamera | ( | ) | const |
Gets the CameraProxy associated with this viewport.
Definition at line 82 of file viewport.cpp.
Real Mezzanine::Graphics::Viewport::GetWidth | ( | ) | const |
Gets the relative width of the viewport.
Definition at line 118 of file viewport.cpp.
Integer Mezzanine::Graphics::Viewport::GetZOrder | ( | ) | const |
Gets the Zorder assigned to this viewport.
Definition at line 91 of file viewport.cpp.
void Mezzanine::Graphics::Viewport::SetCamera | ( | CameraProxy * | ViewportCamera) |
Sets which CameraProxy is bound to this viewport.
ViewportCamera | Pointer to the CameraProxy to be bount to this viewport, or NULL to simply unbind a CameraProxy. |
Definition at line 70 of file viewport.cpp.
void Mezzanine::Graphics::Viewport::SetDimensions | ( | const Vector2 & | Position, |
const Vector2 & | Size | ||
) |
Sets the position and size of this viewport within the game window.
Position | Vector2 of relative values(range: 0-1) representing the top left corner of the viewport. Values are relative to the game window this viewport belongs to. |
Size | Vector2 of relative values(range: 0-1) representing the width and height of the viewport. Values are relative to the game window this viewport belongs to. |
Definition at line 106 of file viewport.cpp.
void Mezzanine::Graphics::Viewport::SetDimensions | ( | const Real & | Left, |
const Real & | Top, | ||
const Real & | Width, | ||
const Real & | Height | ||
) |
Sets the position and size of this viewport within the game window.
Left | A relative value(range: 0-1) representing the leftmost position of the viewport. |
Top | A relative value(range: 0-1) representing the topmost position of the viewport. |
Width | A relative value(range: 0-1) representing the width of the viewport. |
Height | A relative value(range: 0-1) representing the height of the viewport. |
Definition at line 109 of file viewport.cpp.
|
protected |
A pointer to the internal viewport providing this classes functionality.
Definition at line 70 of file viewport.h.
|
protected |
A pointer to the window that created this viewport.
Definition at line 73 of file viewport.h.
|
protected |
A pointer to the camera being used to render this viewport, or NULL if one isn't set.
Definition at line 76 of file viewport.h.