charcoal/OpenGLEngine/Camera.h

29 lines
571 B
C
Raw Normal View History

#pragma once
#include <glm/glm.hpp>
#include "Poseable.h"
2018-09-12 21:03:46 +00:00
namespace charcoal
{
2018-09-12 21:03:46 +00:00
using namespace glm;
class Camera
{
public:
Camera() : m_view_matrix(1.0f), m_projection_matrix(1.0f) {}
2018-09-12 21:03:46 +00:00
mat4 get_world_to_view_matrix() const { return m_projection_matrix * m_view_matrix; }
2018-09-12 13:46:55 +00:00
const vec3& get_position() const { return m_position; }
2018-09-12 21:03:46 +00:00
const mat4& get_view_matrix() const { return m_view_matrix; }
2018-09-12 21:03:46 +00:00
const mat4& get_projection_matrix() const { return m_projection_matrix; }
2018-09-12 21:03:46 +00:00
protected:
vec3 m_position;
2018-09-12 21:03:46 +00:00
mat4 m_view_matrix;
mat4 m_projection_matrix;
};
}