2010-12-04 16:14:34 +00:00
|
|
|
|
/********************************************************
|
|
|
|
|
* Viewport.h *
|
|
|
|
|
* *
|
|
|
|
|
* XFX Viewport definition file *
|
|
|
|
|
* Copyright <EFBFBD> XFX Team. All Rights Reserved *
|
|
|
|
|
********************************************************/
|
2010-12-27 01:01:25 +00:00
|
|
|
|
#ifndef _XFX_GRAPHICS_VIEWPORT_
|
|
|
|
|
#define _XFX_GRAPHICS_VIEWPORT_
|
2012-03-29 22:02:43 +00:00
|
|
|
|
|
|
|
|
|
#include <System/Object.h>
|
|
|
|
|
|
|
|
|
|
using namespace System;
|
|
|
|
|
|
2010-12-04 16:14:34 +00:00
|
|
|
|
namespace XFX
|
|
|
|
|
{
|
|
|
|
|
struct Matrix;
|
|
|
|
|
struct Vector3;
|
|
|
|
|
|
|
|
|
|
namespace Graphics
|
|
|
|
|
{
|
2012-03-29 22:02:43 +00:00
|
|
|
|
// Defines the window dimensions of a render-target surface onto which a 3D volume projects.
|
|
|
|
|
struct Viewport : virtual Object
|
2010-12-04 16:14:34 +00:00
|
|
|
|
{
|
|
|
|
|
private:
|
|
|
|
|
static bool WithinEpsilon(float a, float b);
|
|
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
float AspectRatio();
|
|
|
|
|
int Height;
|
|
|
|
|
int MaxDepth;
|
|
|
|
|
int MinDepth;
|
|
|
|
|
int Width;
|
|
|
|
|
int X;
|
|
|
|
|
int Y;
|
|
|
|
|
|
2011-06-09 12:57:16 +00:00
|
|
|
|
bool Equals(Viewport obj);
|
|
|
|
|
int GetHashCode();
|
2010-12-04 16:14:34 +00:00
|
|
|
|
Vector3 Project(Vector3 source, Matrix projection, Matrix view, Matrix world);
|
2012-03-29 22:02:43 +00:00
|
|
|
|
char* ToString();
|
2010-12-04 16:14:34 +00:00
|
|
|
|
Vector3 Unproject(Vector3 source, Matrix projection, Matrix view, Matrix world);
|
2011-06-09 12:57:16 +00:00
|
|
|
|
|
|
|
|
|
bool operator !=(Viewport right);
|
|
|
|
|
bool operator ==(Viewport right);
|
2010-12-04 16:14:34 +00:00
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
}
|
2010-12-27 01:01:25 +00:00
|
|
|
|
|
|
|
|
|
#endif //_XFX_GRAPHICS_VIEWPORT_
|