Removed WIDEASPECT hack.

This was SVN commit r107.
This commit is contained in:
notpete 2003-11-25 20:17:46 +00:00
parent ca321696d8
commit 455f03582b

View File

@ -15,35 +15,32 @@
CCamera::CCamera ()
{
#ifdef WIDEASPECT
m_ViewPort.m_Width = 1440;
m_ViewPort.m_Height = 900;
#else
m_ViewPort.m_Width = 1600;
m_ViewPort.m_Height = 1200;
#endif
// set viewport to something anything should handle, but should be initialised
// to window size before use
m_ViewPort.m_X = 0;
m_ViewPort.m_Y = 0;
m_ViewPort.m_Width = 800;
m_ViewPort.m_Height = 600;
}
CCamera::~CCamera ()
{
}
void CCamera::SetProjection (float nearp, float farp, float fov)
{
float h, w, Q;
m_NearPlane = nearp;
m_FarPlane = farp;
m_FOV = fov;
float Aspect = (float)m_ViewPort.m_Width/(float)m_ViewPort.m_Height;
w = 1/tanf (fov*0.5f*Aspect);
h = 1/tanf (fov*0.5f);
Q = m_FarPlane / (m_FarPlane - m_NearPlane);
m_ProjMat.SetZero ();
m_ProjMat._11 = w;
m_ProjMat._22 = h;
@ -61,7 +58,7 @@ void CCamera::UpdateFrustum ()
CMatrix3D MatView;
MatView = m_Orientation.GetTranspose ();
MatFinal = m_ProjMat * MatView;
//get the RIGHT plane