#pragma once

#include <Core/Math/Matrix.h>
#include <Juliet.h>

namespace Juliet
{
    struct Camera
    {
        Vector3 Position;
        Vector3 Target;
        Vector3 Up;
        float   FOV; // In radians
        float   AspectRatio;
        float   NearPlane;
        float   FarPlane;
    };

    inline Matrix Camera_GetViewMatrix(const Camera& cam)
    {
        return LookAt(cam.Position, cam.Target, cam.Up);
    }

    inline Matrix Camera_GetProjectionMatrix(const Camera& cam)
    {
        return PerspectiveFov(cam.FOV, cam.AspectRatio, cam.NearPlane, cam.FarPlane);
    }

    inline Matrix Camera_GetViewProjectionMatrix(const Camera& cam)
    {
        return Camera_GetProjectionMatrix(cam) * Camera_GetViewMatrix(cam);
    }
} // namespace Juliet
