From 13beac44e04bd4313109347498bff1ebb5f03c65 Mon Sep 17 00:00:00 2001 From: Fabian Klemp Date: Fri, 14 Nov 2014 18:31:26 +0100 Subject: [PATCH] Changed rotation from three to two vertices. --- camera.cc | 10 +++++----- camera.hh | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/camera.cc b/camera.cc index 2036d94..c5b3c77 100644 --- a/camera.cc +++ b/camera.cc @@ -1,12 +1,12 @@ #include "camera.hh" -Camera::Camera(glm::vec3 rotation, float distance) { +Camera::Camera(glm::vec2 rotation, float distance) { this->rotation = rotation; this->distance = distance; } Camera::Camera() { - rotation = glm::vec3(0.0f, 0.0f, 0.0f); + rotation = glm::vec2(0.0f, 0.0f); distance = 1.0f; } @@ -21,14 +21,14 @@ void Camera::setDistance(float distance) { this->distance = distance; } -glm::vec3 Camera::getRotation() { +glm::vec2 Camera::getRotation() { return rotation; } -void Camera::setRotation(glm::vec3 rotation) { +void Camera::setRotation(glm::vec2 rotation) { this->rotation = rotation; } -void Camera::updateRotation(glm::vec3 rotation) { +void Camera::updateRotation(glm::vec2 rotation) { this->rotation += rotation;; } diff --git a/camera.hh b/camera.hh index 7cf3d98..7391fa3 100644 --- a/camera.hh +++ b/camera.hh @@ -5,17 +5,17 @@ class Camera { public: - Camera(glm::vec3 rotation, float distance); + Camera(glm::vec2 rotation, float distance); Camera(); ~Camera(); float getDistance(); void setDistance(float distance); - glm::vec3 getRotation(); - void setRotation(glm::vec3 rotation); - void updateRotation(glm::vec3 rotation); //adds to current rotation + glm::vec2 getRotation(); + void setRotation(glm::vec2 rotation); + void updateRotation(glm::vec2 rotation); //adds to current rotation private: float distance; - glm::vec3 rotation; + glm::vec2 rotation; }; #endif