/***************************************************************************** * Viewport.h * * * * XFX::Graphics::Viewport structure definition file * * Copyright (c) XFX Team. All Rights Reserved * *****************************************************************************/ #ifndef _XFX_GRAPHICS_VIEWPORT_ #define _XFX_GRAPHICS_VIEWPORT_ #include using namespace System; namespace XFX { struct Matrix; struct Rectangle; struct Vector3; namespace Graphics { /** * Defines the window dimensions of a render-target surface onto which a 3D volume projects. */ struct Viewport : Object { private: static bool WithinEpsilon(float a, float b); public: float getAspectRatio() const; Rectangle getBounds() const; void setBounds(const Rectangle value); int Height; float MaxDepth; float MinDepth; Rectangle getTitleSafeArea() const; int Width; int X; int Y; Viewport(); Viewport(const int x, const int y, const int width, const int height); Viewport(const Rectangle bounds); bool Equals(Object const * const obj) const; bool Equals(const Viewport obj) const; int GetHashCode() const; static const Type& GetType(); Vector3 Project(const Vector3 source, const Matrix projection, const Matrix view, const Matrix world) const; const String ToString() const; Vector3 Unproject(const Vector3 source, const Matrix projection, const Matrix view, const Matrix world) const; bool operator !=(const Viewport& right) const; bool operator ==(const Viewport& right) const; }; } } #endif //_XFX_GRAPHICS_VIEWPORT_