68 float near,
float far) {
69 const float xscale = near / fx;
70 const float yscale = near / fy;
72 const float xoffset = (cx - (width / 2.0)) * xscale;
74 const float yoffset = -(cy - (height / 2.0)) * yscale;
77 xscale * width / 2.0
f - xoffset,
78 yscale * -height / 2.0
f - yoffset,
79 yscale * height / 2.0
f - yoffset,
void SetNearFarClipPlanes(const float near, const float far)
void SetWindowSize(const float width, const float height)
static glm::mat4 ProjectionMatrixForCameraIntrinsics(float width, float height, float fx, float fy, float cx, float cy, float near, float far)
void SetFieldOfView(const float fov)
glm::mat4 GetProjectionMatrix()
glm::mat4 GetViewMatrix()
GLM_FUNC_DECL matType< T, P > inverse(matType< T, P > const &m)