3205680062
Also added a required prerender function to scene and application. This function is intended to be used as a way to prepare the scene to be rendered in its current state. For that reason, the delta time and the current clock tick are not passed to it.
23 lines
458 B
C++
23 lines
458 B
C++
#pragma once
|
|
|
|
#include <glm/glm.hpp>
|
|
|
|
#include "Poseable.h"
|
|
|
|
using namespace glm;
|
|
|
|
class Camera
|
|
{
|
|
public:
|
|
Camera() : m_view_matrix(1.0f), m_projection_matrix(1.0f) {}
|
|
|
|
mat4 get_world_to_view_matrix() const { return m_projection_matrix * m_view_matrix; }
|
|
|
|
const mat4& get_view_matrix() const { return m_view_matrix; }
|
|
|
|
const mat4& get_projection_matrix() const { return m_projection_matrix; }
|
|
|
|
protected:
|
|
mat4 m_view_matrix;
|
|
mat4 m_projection_matrix;
|
|
}; |