1d19d370cb
This removes the offset created by the vtable (8 bytes). This means that pure Poseables are now tightly ;3 packed.
30 lines
636 B
C++
30 lines
636 B
C++
#pragma once
|
|
|
|
#include "Camera.h"
|
|
|
|
#include <glm/glm.hpp>
|
|
|
|
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);
|
|
|
|
const vec3& get_size() const { return m_size; }
|
|
const vec3& get_position() const { return m_position; }
|
|
|
|
private:
|
|
void update_scale();
|
|
|
|
vec3 m_size;
|
|
vec3 m_position;
|
|
};
|