#pragma once
#include <vectors/vec3.h>
#include <glm/mat4x4.hpp>

namespace render{

class camera
{
public:
    vec3f position;
    vec3f rotation;
    vec3f scale;
    vec2f screenSize;

    camera();
    void bind();
    virtual void math() = 0;

    const float *getView() const;
    const float *getProj() const;

    const glm::mat4 &view;
    const glm::mat4 &proj;

    const glm::mat4 &getViewMatrix() const;
    vec2f screenToWorld(const vec2d&) const;
protected:
    glm::mat4 _view, _proj;
};

class camera2D: public camera
{
public:
    vec2f offset;
    void math();
};

class camera3D: public camera
{
public:
    camera3D();
    float fov;
    void math();
};

class camera3DFlat: public camera
{
public:
    void math();
};

}
