18 void setAspect(
float width,
float height);
22 void setFov(
float fovyDegrees);
34 void setEye(glm::vec3 eye);
43 void setTarget(
float pitch,
float yaw,
float roll);
47 void setUp(glm::vec3 up);
58 [[nodiscard]]
const glm::vec3&
getEye()
const {
return eye_; }
60 [[nodiscard]] glm::vec3
getRight()
const;
61 [[nodiscard]]
const glm::vec3&
getUp()
const {
return up_; }
64 glm::vec3
eye_{0.0f, 0.0f, 3.0f};
66 glm::vec3
up_{0.0f, 1.0f, 0.0f};
69 float fovy_ = glm::radians(60.0f);
glm::mat4 view_projection_
Definition Camera.hpp:74
glm::vec3 up_
Definition Camera.hpp:66
float fovy_
Definition Camera.hpp:69
float zFar_
Far clip; covers the 4 000-unit play area with margin.
Definition Camera.hpp:72
void setEye(glm::vec3 eye)
Set the camera eye position in world space (modifies view matrix).
Definition Camera.cpp:35
float zNear_
Near clip (Quake units); 5 ≈ half a foot.
Definition Camera.hpp:71
const glm::vec3 & getUp() const
Definition Camera.hpp:61
void setZFar(float zFar)
Set the far clip plane distance.
Definition Camera.cpp:30
glm::vec3 target_
Definition Camera.hpp:65
void setUp(glm::vec3 up)
Explicitly set the camera up direction, overriding setTarget's up vector.
Definition Camera.cpp:57
void computeViewProjectionMatrix()
Recompute the combined view-projection matrix from current parameters.
Definition Camera.cpp:62
glm::mat4 getViewProjectionMatrix() const
Return the combined view-projection matrix.
Definition Camera.hpp:53
NewCamera()
Construct a NewCamera with default perspective and position.
Definition Camera.cpp:10
glm::vec3 eye_
Definition Camera.hpp:64
const glm::vec3 & getEye() const
Definition Camera.hpp:58
void setAspect(float width, float height)
Set the aspect ratio from pixel dimensions (modifies projection matrix).
Definition Camera.cpp:15
void setFov(float fovyDegrees)
Set the vertical field of view in degrees.
Definition Camera.cpp:20
glm::vec3 getRight() const
Definition Camera.cpp:74
void setZNear(float zNear)
Set the near clip plane distance.
Definition Camera.cpp:25
glm::mat4 getViewProjection() const
Alias for getViewProjectionMatrix() — kept short for callsite ergonomics.
Definition Camera.hpp:56
float aspect_
Definition Camera.hpp:70
glm::vec3 getForward() const
Definition Camera.cpp:69
void setTarget(float pitch, float yaw, float roll)
Set the view direction from pitch, yaw, and roll (all in radians).
Definition Camera.cpp:41