blob: 6d8bb94a2a7d9f4f0c7a4836fc31cc2a9b2a4680 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
/*
* Copyright (C) 2018 Tomasz Kramkowski <tk@the-tk.com>
* SPDX-License-Identifier: MIT
*/
#ifndef CAMERA_H
#define CAMERA_H
#include "linmath.h"
#define CAM_UP ((vec3){ 0.0, 1.0, 0.0 })
struct camera {
vec3 pos;
float pitch;
float yaw;
};
void camera_clamp(struct camera *cam);
void camera_dir(vec3 out, struct camera *cam);
void camera_lookat(mat4x4 out, struct camera *cam);
#endif // CAMERA_H
|