summaryrefslogtreecommitdiff
path: root/src/extend/camera.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/extend/camera.h')
-rw-r--r--src/extend/camera.h17
1 files changed, 14 insertions, 3 deletions
diff --git a/src/extend/camera.h b/src/extend/camera.h
index 8227dbf..e43efe6 100644
--- a/src/extend/camera.h
+++ b/src/extend/camera.h
@@ -4,6 +4,7 @@
#include "../math/math.h"
#include "transform.h"
#include "../extern/wog.h"
+#include "../extern/wog.h"
#undef near
#undef far
@@ -16,7 +17,16 @@ typedef struct {
Mat4 proj_matrix;
bool is_viewdirty, is_projdirty;
/*operations*/
- float zoom_speed;
+ float zoom_speed;
+ Vec2 rotate_sensitivity;
+ Vec2 move_sensitivity;
+ Euler euler;
+ /*events*/
+ bool look_around;
+ Vec2 mouse_prev;
+ bool move_around;
+ /*window*/
+ wog_Window* wnd;
} Camera;
typedef struct CameraConfig {
@@ -24,11 +34,12 @@ typedef struct CameraConfig {
Vec3 pos;
}CameraConfig;
-void camera_init(Camera* cam);
+void camera_init(Camera* cam, wog_Window* wnd);
void camera_setposition(float x, float y, float z);
-void camera_onevent(Camera* cam, wog_Event* e);
+void camera_onevent(Camera* cam, wog_Event* e, float dt);
+void camera_onupdate(Camera* cam, float dt);
void camera_getmatrix(Mat4* view, Mat4* proj);