#include <gear/camera.h>
#include <log.c/log.h>

g_camera* g_camera_create(vec3 position, vec3 rotation, float fov) {
    g_camera* camera = calloc(1, sizeof(g_camera));
    if(camera != NULL) {
        log_info("Camera allocated successfully");
        log_debug("Camera pointer: %p", camera);

        camera->position = position;
        camera->rotation = rotation;
        camera->fov = fov;
        camera->near = 0.1f;
        camera->far = 1000.0f;
    } else {
        log_fatal("Failed to allocate camera");
        exit(EXIT_FAILURE);
    }

    return camera;
}
