mirror of
https://github.com/Halofreak1990/XFXFramework
synced 2024-12-26 13:49:34 +01:00
Now, the only thing keeping XFX from a full compile is my stupid attempt at Asynchronous IO. Will look at that, but most likely, I will comment it out and just get a new Demo out before New Year.
41 lines
971 B
C++
41 lines
971 B
C++
/********************************************************
|
|
* Viewport.h *
|
|
* *
|
|
* XFX Viewport definition file *
|
|
* Copyright © XFX Team. All Rights Reserved *
|
|
********************************************************/
|
|
#ifndef _XFX_GRAPHICS_VIEWPORT_
|
|
#define _XFX_GRAPHICS_VIEWPORT_
|
|
|
|
namespace XFX
|
|
{
|
|
struct Matrix;
|
|
struct Vector3;
|
|
|
|
namespace Graphics
|
|
{
|
|
/// <summary>
|
|
/// Defines the window dimensions of a render-target surface onto which a 3D volume projects.
|
|
/// </summary>
|
|
struct Viewport
|
|
{
|
|
private:
|
|
static bool WithinEpsilon(float a, float b);
|
|
|
|
public:
|
|
float AspectRatio();
|
|
int Height;
|
|
int MaxDepth;
|
|
int MinDepth;
|
|
int Width;
|
|
int X;
|
|
int Y;
|
|
|
|
Vector3 Project(Vector3 source, Matrix projection, Matrix view, Matrix world);
|
|
Vector3 Unproject(Vector3 source, Matrix projection, Matrix view, Matrix world);
|
|
};
|
|
}
|
|
}
|
|
|
|
#endif //_XFX_GRAPHICS_VIEWPORT_
|