aboutsummaryrefslogtreecommitdiff
path: root/08-august/src/camera.h
diff options
context:
space:
mode:
authorThomas Guillermo Albers Raviola <thomas@thomaslabs.org>2026-01-16 23:02:32 +0100
committerThomas Guillermo Albers Raviola <thomas@thomaslabs.org>2026-01-16 23:02:32 +0100
commit6b8af9cf83851c075c6c9514b1deaa931c2b19a4 (patch)
tree428986b49c32e21d3f7a3c2dfa41858ae0153209 /08-august/src/camera.h
Initial commit
Diffstat (limited to '08-august/src/camera.h')
-rw-r--r--08-august/src/camera.h32
1 files changed, 32 insertions, 0 deletions
diff --git a/08-august/src/camera.h b/08-august/src/camera.h
new file mode 100644
index 0000000..384bee8
--- /dev/null
+++ b/08-august/src/camera.h
@@ -0,0 +1,32 @@
+#ifndef CAMERA_H
+#define CAMERA_H
+
+#include "math/matrix4x4.h"
+#include "math/vector3f.h"
+#include "math/vector2f.h"
+#include <stdbool.h>
+
+typedef struct
+{
+ vec3_t position;
+ vec3_t viewDirection;
+ vec3_t up;
+ mat4_t projectionMatrix;
+ mat4_t viewMatrix;
+ vec2_t mousePosition;
+ bool needsUpdate;
+} camera_t;
+
+extern void Camera_Init(camera_t* camera);
+extern void Camera_Move_Up(camera_t* camera);
+extern void Camera_Move_Down(camera_t* camera);
+extern void Camera_Move_Left(camera_t* camera);
+extern void Camera_Move_Right(camera_t* camera);
+extern void Camera_Move_Foward(camera_t* camera);
+extern void Camera_Move_Backward(camera_t* camera);
+extern void Camera_MouseUpdate(camera_t* camera, const vec2_t* newMousePosition);
+
+/* Consigue la viewMatrix */
+extern mat4_t Camera_GetModelToViewMatrix(camera_t* camera);
+
+#endif // CAMERA_H