27 lines
424 B
C
27 lines
424 B
C
#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);
|
|
|