diff options
Diffstat (limited to 'camera.h')
-rw-r--r-- | camera.h | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/camera.h b/camera.h new file mode 100644 index 0000000..6d8bb94 --- /dev/null +++ b/camera.h @@ -0,0 +1,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 |