From: Eleni Maria Stea Date: Wed, 12 Jul 2017 15:20:57 +0000 (+0300) Subject: backup some changes: X-Git-Url: https://eleni.mutantstargoat.com/git/?a=commitdiff_plain;ds=sidebyside;h=refs%2Fheads%2FMyCommit;p=demo backup some changes: - camera class - mouse/motion glfw callbacks --- 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