diff --git a/src/camera.cpp b/src/camera.cpp index 626cbf89..37b4fc5f 100644 --- a/src/camera.cpp +++ b/src/camera.cpp @@ -61,6 +61,16 @@ void Camera::SetPerspective(float fov, float width, float height, m_proj_matrix = mat4::perspective(fov, width, height, near, far); } +void Camera::SetTarget(vec3 const &pos) +{ + m_target = pos; +} + +vec3 Camera::GetTarget() +{ + return m_target; +} + mat4 const &Camera::GetViewMatrix() { return m_view_matrix; diff --git a/src/camera.h b/src/camera.h index 427463a1..e3628b3e 100644 --- a/src/camera.h +++ b/src/camera.h @@ -34,6 +34,8 @@ public: void SetOrtho(float width, float height, float near, float far); void SetPerspective(float fov, float width, float height, float near, float far); + void SetTarget(vec3 const &pos); + vec3 GetTarget(); mat4 const &GetViewMatrix(); mat4 const &GetProjMatrix();