backup some changes: MyCommit
authorEleni Maria Stea <estea@igalia.com>
Wed, 12 Jul 2017 15:20:57 +0000 (18:20 +0300)
committerEleni Maria Stea <estea@igalia.com>
Wed, 12 Jul 2017 15:20:57 +0000 (18:20 +0300)
- camera class
- mouse/motion glfw callbacks

src/camera.cc [new file with mode: 0644]
src/camera.h [new file with mode: 0644]

diff --git a/src/camera.cc b/src/camera.cc
new file mode 100644 (file)
index 0000000..d7839b5
--- /dev/null
@@ -0,0 +1,20 @@
+#include <gmath/gmath.h>
+#include "camera.h"
+
+Camera::Camera()
+{
+       phi = theta = distance = 0;
+       fov = 0;
+       m_projection = Mat4::identity;
+}
+
+Camera::Camera(float phi, float theta, float distance, float fov)
+{
+       this->phi = phi;
+       this->theta = theta;
+       this->distance = distance;
+
+       this->fov = fov;
+}
+
+Camera::~Camera() {}
\ No newline at end of file
diff --git a/src/camera.h b/src/camera.h
new file mode 100644 (file)
index 0000000..8b3a895
--- /dev/null
@@ -0,0 +1,20 @@
+#ifndef CAMERA_H_
+#define CAMERA_H_
+
+#include <gmath/gmath.h>
+
+class Camera {
+public:
+       float phi;
+       float theta;
+       float distance;
+
+       Mat4 m_projection;
+       float fov;
+
+       Camera();
+       Camera(float phi, float theta, float distance, float fov);
+       ~Camera();
+};
+
+#endif // CAMERA_H_
\ No newline at end of file