5 #include "VectorMath.h"
40 void SetViewport(
float x,
float y,
float width,
float height);
46 void SetProjection (
float nominalVerticalFovRadians,
float nearZ,
float farZ);
93 float GetFOV()
const {
return m_fov; }
113 const static float NominalAspectRatio;
114 const static float MinAspectRatioForPortraitMode;
129 float m_viewportWidth;
130 float m_viewportHeight;
141 std::vector<Geometry::Plane> m_scratchFrustumPlanes;
143 bool m_projectionDirty;
145 bool m_viewProjectionDirty;
151 void InvalidateProjection() { m_projectionDirty =
true; }
152 void InvalidateView() { m_viewDirty =
true; }
154 void InvalidateCachedTransforms();
156 void SetExplicitProjection(
Eegeo::m44& projectionMatrix);
166 mutable CachedState m_cachedState;
168 void CalculateViewMatrix(
Eegeo::m44& viewMatrix)
const;
169 void CalculateProjectionMatrix(
Eegeo::m44& projectionMatrix)
const;
170 void ClipSpaceToScreenSpace(
const Eegeo::v4& clipPosition,
Eegeo::v3& screenPosition)
const;
171 float CalculateTweakedNearPlaneHalfHeight()
const;