#ifndef _PIUMA_CAMERA_H_
#define _PIUMA_CAMERA_H_

#include "lib/types.h"
#include "lib/math.h"


static const v3 r_camera_up_vector = {0,0,1};

struct r_camera_base
{
	v3 position;
	v3 direction;
	v3 up;
};

void r_camera_base_look_at(r_camera_base *c, v3 target);
m4 r_camera_base_view(r_camera_base *c);


struct r_camera_fps
{
	v3 position;
	// Forward = +y, Right = +x, Up = +z
	f32 yaw;
	f32 pitch;
};

void r_camera_fps_look_at(r_camera_fps *c, v3 target);
m4 r_camera_fps_view(r_camera_fps *c);
v3 r_camera_fps_direction(r_camera_fps *c);


m4 r_view_matrix(v3 position, v3 direction, v3 up);
m4 r_perspective_matrix(f32 fov, f32 aspect_ratio, f32 near_plane, f32 far_plane);
m4 r_orthographic_matrix(f32 left, f32 right, f32 bottom, f32 top, f32 near, f32 far);

#endif
