| @@ -61,6 +61,16 @@ void Camera::SetPerspective(float fov, float width, float height, | |||||
| m_proj_matrix = mat4::perspective(fov, width, height, near, far); | 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() | mat4 const &Camera::GetViewMatrix() | ||||
| { | { | ||||
| return m_view_matrix; | return m_view_matrix; | ||||
| @@ -34,6 +34,8 @@ public: | |||||
| void SetOrtho(float width, float height, float near, float far); | void SetOrtho(float width, float height, float near, float far); | ||||
| void SetPerspective(float fov, float width, float height, | void SetPerspective(float fov, float width, float height, | ||||
| float near, float far); | float near, float far); | ||||
| void SetTarget(vec3 const &pos); | |||||
| vec3 GetTarget(); | |||||
| mat4 const &GetViewMatrix(); | mat4 const &GetViewMatrix(); | ||||
| mat4 const &GetProjMatrix(); | mat4 const &GetProjMatrix(); | ||||