40 #ifndef _graphicsviewport_cpp
41 #define _graphicsviewport_cpp
43 #include "Graphics/viewport.h"
45 #include "Graphics/gamewindow.h"
58 ViewportCam(ViewportCamera)
101 #if OGRE_NO_VIEWPORT_ORIENTATIONMODE != 0
102 return Mezzanine::OM_Degree_0;
115 { this->
OgreViewport->setDimensions(Left,Top,Width,Height); }
196 if( !CurrAttrib.
Empty() )
204 if( !PositionNode.
Empty() ) {
209 if( !SizeNode.
Empty() ) {
225 {
return "Viewport"; }
void SetCamera(CameraProxy *ViewportCamera)
Sets which CameraProxy is bound to this viewport.
Attribute AppendAttribute(const Char8 *Name)
Creates an Attribute and puts it at the end of this Nodes attributes.
Whole GetActualTop() const
Gets the top position of the viewport in pixels.
A light-weight handle for manipulating attributes in DOM tree.
Vector2 GetPosition() const
Gets the position of this viewport in it's parent GameWindow in relative units.
~Viewport()
Class destructor.
Real GetTop() const
Gets the relative top position of the viewport.
Thrown when the requested identity could not be found.
Integer GetZOrder() const
Gets the Zorder assigned to this viewport.
Node GetFirstChild() const
Get the first child Node of this Node.
#define MEZZ_EXCEPTION(num, desc)
An easy way to throw exceptions with rich information.
void ProtoSerialize(XML::Node &ParentNode) const
Convert this class to an XML::Node ready for serialization.
int Integer
A datatype used to represent any integer close to.
Thrown when a version is accessed/parsed/required and it cannot work correctly or is missing...
Ogre::RenderWindow * _GetOgreWindowPointer()
This will get a pointer to the Ogre RenderWindow.
bool Empty() const
Is this storing anything at all?
Whole GetActualWidth() const
Gets the width of the viewport in pixels.
This implements the exception hiearchy for Mezzanine.
Viewport(CameraProxy *ViewportCamera, const Integer &ZOrder, GameWindow *ParentWindow)
Class constructor.
GameWindow * Parent
A pointer to the window that created this viewport.
float Real
A Datatype used to represent a real floating point number.
The interface for serialization.
bool SetValue(const Char8 *rhs)
Set the value of this.
void ProtoDeSerialize(const XML::Node &SelfRoot)
Take the data stored in an XML Node and overwrite this object with it.
Vector2 GetActualPosition() const
Gets the position of this viewport in it's parent GameWindow in pixels.
Real Y
Coordinate on the Y vector.
This file contains the declaration for the World proxy wrapping camera functionality.
Real GetLeft() const
Gets the relative left position of the viewport.
A light-weight handle for manipulating nodes in DOM tree.
GameWindow * GetParentWindow() const
Gets the game window this viewport belongs to.
Real X
Coordinate on the X vector.
int AsInt(int def=0) const
Attempts to convert the value of the attribute to an int and returns the results. ...
This is used to represent a point on a 2 dimentional area, such as a screen.
bool Empty() const
Is this storing anything at all?
Integer AsInteger(Integer def=0) const
Attempts to convert the value of the attribute to a Integer and returns the results.
Whole GetActualHeight() const
Gets the height of the viewport in pixels.
CameraProxy * ViewportCam
A pointer to the camera being used to render this viewport, or NULL if one isn't set.
Vector2 GetSize() const
Gets the size of this viewport relative to it's parent GameWindow.
This is the proxy class for placing and manipulating a camera in the scene.
Viewport * CameraVP
This is a pointer to the Viewport this camera is attached to, if any.
CameraProxy * GetCamera() const
Gets the CameraProxy associated with this viewport.
Ogre::Viewport * OgreViewport
A pointer to the internal viewport providing this classes functionality.
Whole GetActualLeft() const
Gets the left position of the viewport in pixels.
void ProtoSerialize(XML::Node &CurrentRoot) const
Convert this class to an XML::Node ready for serialization.
The bulk of the engine components go in this namspace.
static String GetSerializableName()
Get the name of the the XML tag the Renderable class will leave behind as its instances are serialize...
OrientationMode
Simple enum for communicating the orientation the UI and Camera have relative to the world it is rend...
unsigned long Whole
Whole is an unsigned integer, it will be at least 32bits in size.
Real GetHeight() const
Gets the relative height of the viewport.
Real GetWidth() const
Gets the relative width of the viewport.
virtual Ogre::Camera * _GetGraphicsObject() const
Accessor for the internal camera.
const Char8 * Name() const
ptrdiff_tGet the name of this Node.
void SerializeError(const String &FailedTo, const String &ClassName, Boole SOrD)
Simply does some string concatenation, then throws an Exception.
Node AppendChild(NodeType Type=NodeElement)
Creates a Node and makes it a child of this one.
Ogre::Viewport * _GetOgreViewport() const
Gets the internal Ogre Viewport.
std::string String
A datatype used to a series of characters.
void ProtoDeSerialize(const XML::Node &OneNode)
Take the data stored in an XML and overwrite this instance of this object with it.
Attribute GetAttribute(const Char8 *Name) const
Attempt to get an Attribute on this Node with a given name.
Vector2 GetActualSize() const
Gets the size of this viewport in pixels.
This class is for creating and managing game windows.
Mezzanine::OrientationMode GetOrientationMode() const
Gets the current Orientation of the viewport.
Node GetChild(const Char8 *Name) const
Attempt to get a child Node with a given name.
void SetDimensions(const Vector2 &Position, const Vector2 &Size)
Sets the position and size of this viewport within the game window.