#ifndef TWN_CAMERA_H
#define TWN_CAMERA_H

#include "twn_types.h"
#include "twn_types_c.h"

/* TODO: make it cached? */
/*       for example, perspective matrix only needs recaluclation on FOV change */

/* first person camera class */
typedef struct Camera {
    Vec3 pos;        /* eye position */
    Vec3 target;     /* normalized target vector */
    Vec3 up;         /* normalized up vector */
    float fov;       /* field of view, in radians */
    Vec2 viewbox[2]; /* othrographic aabb, ((left, right), (top, bottom)) */
} Camera;

Matrix4 camera_look_at(const Camera *camera);
Matrix4 camera_perspective(const Camera *const camera);
Matrix4 camera_orthographic(const Camera *const camera);

#endif
