Changed all of the isometric functionality to mapinfo and playerinfo variables. Retained function of most of the CVars.

This commit is contained in:
Dileep V. Reddy 2024-01-19 22:30:31 -07:00 committed by Rachael Alexanderson
commit dc897eacc0
15 changed files with 101 additions and 34 deletions

View file

@ -146,16 +146,16 @@ float VREyeInfo::getShift() const
return vr_swap_eyes ? -res : res;
}
VSMatrix VREyeInfo::GetProjection(float fov, float aspectRatio, float fovRatio, bool isocam) const
VSMatrix VREyeInfo::GetProjection(float fov, float aspectRatio, float fovRatio, bool iso_ortho) const
{
VSMatrix result;
if (isocam) // Orthographic projection for isometric viewpoint
if (iso_ortho) // Orthographic projection for isometric viewpoint
{
double zNear = -1.0; // screen->GetZNear();
double zFar = screen->GetZFar();
double fH = r_iso_dist * tan(DEG2RAD(fov) / 2) / fovRatio;
double fH = tan(DEG2RAD(fov) / 2) / fovRatio;
double fW = fH * aspectRatio * mScaleFactor;
double left = -fW;
double right = fW;

View file

@ -27,7 +27,7 @@ struct VREyeInfo
float mShiftFactor;
float mScaleFactor;
VSMatrix GetProjection(float fov, float aspectRatio, float fovRatio, bool isocam) const;
VSMatrix GetProjection(float fov, float aspectRatio, float fovRatio, bool iso_ortho) const;
DVector3 GetViewShift(float yaw) const;
private:
float getShift() const;