1
0
mirror of https://github.com/Halofreak1990/XFXFramework synced 2024-12-26 13:49:34 +01:00
Tom Lint 3a960b5829 Updated comments
Added some new Type infos
Removed excess whitespace
Added some new files
Implemented missing methods
2013-08-13 20:04:25 +02:00

61 lines
1.6 KiB
C++

/*****************************************************************************
* Viewport.h *
* *
* XFX::Graphics::Viewport structure definition file *
* Copyright (c) XFX Team. All Rights Reserved *
*****************************************************************************/
#ifndef _XFX_GRAPHICS_VIEWPORT_
#define _XFX_GRAPHICS_VIEWPORT_
#include <System/Object.h>
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_