From fee757a5adb2ee6561899cb40b3424a6d23c80f3 Mon Sep 17 00:00:00 2001 From: Yoann Date: Wed, 30 Nov 2011 08:46:56 +0100 Subject: [PATCH] =?UTF-8?q?Ajout=20de=20la=20d=C3=A9claration=20de=20la=20?= =?UTF-8?q?class=20cam=C3=A9ra=20dans=20le=20fichier=20view.cpp.=20D=C3=A9?= =?UTF-8?q?finition=20et=20int=C3=A9gration=20de=20la=20classe=20prochaine?= =?UTF-8?q?ment.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- view.hh | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/view.hh b/view.hh index d605cea..7a9ce38 100644 --- a/view.hh +++ b/view.hh @@ -9,6 +9,8 @@ // Calcul correct des normales dans triangle.cpp // Prendre en compte tous les évènements X en attente avant de relancer le rendu. +class Camera; + class View { private: Chose* root; @@ -37,4 +39,20 @@ class View { void setLight(); }; +class Camera { + private: + Vertex cameraCenter; + Vertex cameraSight; + float xAngle; + float yAngle; + int moveDist; + float mouseSensitivity; + + public: + Camera(Vertex pos, float xA, float yA, int moveSensitivity, float mouseSensitivity); + void setCamera() const; + void mouseMotion(const SDL_MouseMotionEvent &event); + void keyboard(const SDL_KeyboardEvent &event); + void animation() const; +}; #endif