/******************************************************************************
*	File		-	orthographic_camera.h
*	Author		-	Joey Pollack
*	Date		-	2022/01/25 (y/m/d)
*	Mod Date	-	2022/01/25 (y/m/d)
*	Description	-	A 2D camera to be used with the World
******************************************************************************/

#ifndef CAMERA_H_
#define CAMERA_H_

#include <core/types.h>

namespace lunarium
{
    class OrthographicCamera
    {
        public:
            OrthographicCamera(Vec2f position = { 0.0f, 0.0f }, Sizef viewport_size = {0.0f, 0.0f });

            void MoveLeft(float amt);
            void MoveUp(float amt);
            void Rotate(float amt);

            void SetPosition(Vec2f position);
            void SetRotation(float rot);

            void SetViewportSize(Sizef size);
            
            glm::mat4 GetViewProjection();
            Sizef GetViewport() const;

        private:
            void RecalculateView();

        private:

            Vec2f mPosition;
            float mRotation;
            Sizef mViewportSize;

            glm::mat4 mProjection;
            glm::mat4 mView;
            glm::mat4 mViewProj;
    };
}

#endif // CAMERA_H_