rendlib/include/camera.h

33 lines
505 B
C
Raw Permalink Normal View History

2024-10-08 17:43:14 +00:00
#ifndef CAMERA_H
#define CAMERA_H
#include <cglm/vec3.h>
#include <cglm/mat4.h>
#define CAMERA_PERSPECTIVE 0x1
2024-10-14 20:40:35 +00:00
#define CAMERA_ORTHOGRAPHIC 0x2
2024-10-08 17:43:14 +00:00
struct camera {
int type;
float fov;
float near_z;
float far_z;
float yaw;
float pitch;
float sensitivity;
float viewport_modifier;
vec3 pos;
vec3 front;
vec3 center;
vec3 up;
mat4 view;
mat4 projection;
};
struct camera *create_camera(int type);
int bake_camera(struct camera *c);
#endif