#ifndef CAMERA_H #define CAMERA_H #include "util.h" /* TODO: make it cached */ /* for example, perspective matrix only needs recaluclation on FOV change */ /* first person camera class */ typedef struct camera { t_fvec3 pos; /* eye position */ t_fvec3 target; /* normalized target vector */ t_fvec3 up; /* normalized up vector */ float fov; /* field of view, in radians */ } t_camera; t_matrix4 camera_look_at(const t_camera *camera); t_matrix4 camera_perspective(const t_camera *const camera); #endif