From f906c6d5d6b93dcc4c0f3d54e679cf86c829b91e Mon Sep 17 00:00:00 2001 From: Eleni Maria Stea Date: Wed, 12 Jul 2017 18:20:57 +0300 Subject: [PATCH] backup some changes: - camera class - mouse/motion glfw callbacks --- src/camera.cc | 20 ++++++++++++++++++++ src/camera.h | 20 ++++++++++++++++++++ 2 files changed, 40 insertions(+) create mode 100644 src/camera.cc create mode 100644 src/camera.h diff --git a/src/camera.cc b/src/camera.cc new file mode 100644 index 0000000..d7839b5 --- /dev/null +++ b/src/camera.cc @@ -0,0 +1,20 @@ +#include +#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 index 0000000..8b3a895 --- /dev/null +++ b/src/camera.h @@ -0,0 +1,20 @@ +#ifndef CAMERA_H_ +#define CAMERA_H_ + +#include + +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 -- 1.7.10.4