blob: 1d160986b5e870f614169bed5aae78217a06676b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
#ifndef __CAMERA__
#include <math.h>
#include "linear.h"
enum CameraMovement {
CAMDIR_FORWARD,
CAMDIR_BACKWARD,
CAMDIR_LEFT,
CAMDIR_RIGHT
};
struct Camera {
Vec3 position, front, up;
float yaw;
float pitch;
float movementSpeed;
float mouseSensivity;
};
Mat4 cameraGetViewMatrix(struct Camera camera);
void cameraProcessKeyboard(struct Camera *camera, enum CameraMovement direction, float deltaTime);
void cameraProcessMouseMovement(struct Camera *camera, float xoffset, float yoffset);
#endif
|