charcoal/OpenGLEngine/Camera2D.h
elipzer 5200ba4dbe Specular Lighting
Next up is attenuation
2018-09-14 23:30:14 -04:00

34 lines
678 B
C++

#pragma once
#include "Camera.h"
#include <glm/glm.hpp>
namespace charcoal
{
using namespace glm;
class Camera2D : public Camera
{
public:
Camera2D(const vec2& size, const vec2& position = vec2(0.0f, 0.0f));
Camera2D(const vec3& size = vec3(2.0f, 2.0f, 2.0f), const vec3& position = vec3(0.0f, 0.0f, 0.0f));
void update_size(const vec3& size);
void update_position(const vec3& position);
void translate(const vec2& translation);
void translate(const vec3& translation);
void prerender();
const vec3& get_size() const { return m_size; }
const vec3& get_position() const { return m_position; }
private:
void update_scale();
vec3 m_size;
};
}