1
0
Fork 0
2022-untitled-game/code/game/engine/camera.h

27 lines
424 B
C
Raw Permalink Normal View History

2022-08-02 16:35:50 +00:00
#pragma once
const vec3 WORLD_UP = {0.0f, 0.0f, 1.0f};
typedef struct camera {
char name[MAX_NAME_LENGTH];
handle_t transform;
vec3 front;
vec3 right;
float yaw;
float pitch;
mat4 view_mat;
} camera_t;
camera_t
camera_create(handle_t transform);
void
camera_move(camera_t* camera, vec3 velocity);
void
camera_rotate(camera_t* camera, float offset_x, float offset_y);
void
camera_update_view(camera_t* camera);