#pragma once

#include "Mat3.h"
#include "World2D.h"
#include "Drawing.h"

namespace Framework
{
    class World2D;
    class Object2D;

    class Camera2D : public DrawableBackground
    {
    protected:
        World2D* world;
        bool tickWorld;
        Vertex wPos;
        float rotation;
        float zoom;
        Mat3<float> matrix;
        Text* name;

    public:
        __declspec(dllexport) Camera2D();
        __declspec(dllexport) virtual ~Camera2D();
        __declspec(dllexport) void setName(const char* name);
        __declspec(dllexport) void setName(Text* name);
        __declspec(dllexport) void lookAtWorldPos(Vertex pos);
        __declspec(dllexport) void lookAtWorldPos(float x, float y);
        __declspec(dllexport) void lookAtWorldArea(float width, float height);
        __declspec(dllexport) void setRotation(float rotation);
        __declspec(dllexport) void setZoom(float zoom);
        __declspec(dllexport) void setWorld(World2D* welt, bool tick);
        __declspec(dllexport) bool tick(double time);
        __declspec(dllexport) void render(Image& zRObj);
        __declspec(dllexport) Vertex getWorldCoordinates(Point screenPos);
        __declspec(dllexport) Vertex getWorldDirection(Vertex dir);
        __declspec(dllexport) Vertex getWorldPosition();
        __declspec(dllexport) float getRotation();
        __declspec(dllexport) float getZoom();
        __declspec(dllexport) const Mat3<float>& getMatrix();
        __declspec(dllexport) Text* getName();
        __declspec(dllexport) Text* zName();
    };

    class TestCamera2D : public Camera2D
    {
    public:
        __declspec(dllexport) bool tick(double time);
    };
} // namespace Framework