From 8ad8165816929301a87e90bbb32c3df6b69030ee Mon Sep 17 00:00:00 2001 From: Yann Herklotz Date: Sat, 2 Sep 2017 12:28:11 +0100 Subject: Updating docs --- camera2d_8hpp_source.html | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'camera2d_8hpp_source.html') diff --git a/camera2d_8hpp_source.html b/camera2d_8hpp_source.html index 582aa3cf..4dced6be 100644 --- a/camera2d_8hpp_source.html +++ b/camera2d_8hpp_source.html @@ -29,7 +29,7 @@
YAGE -  0.02 +  v0.1.1
Yet Another Game Engine
@@ -85,7 +85,7 @@ $(document).ready(function(){initNavTree('camera2d_8hpp_source.html','');});
camera2d.hpp
-Go to the documentation of this file.
1 /* ----------------------------------------------------------------------------
2  * camera2d.hpp
3  *
4  * Copyright (c) 2017 Yann Herklotz Grave <ymherklotz@gmail.com>
5  * MIT License, see LICENSE file for more details.
6  * ----------------------------------------------------------------------------
7  */
8 
9 #ifndef CAMERA_2D_HPP
10 #define CAMERA_2D_HPP
11 
12 #include "glslprogram.hpp"
13 
14 #include <glm/glm.hpp>
15 #include <glm/gtc/matrix_transform.hpp>
16 
17 namespace yage
18 {
19 
20 class Camera2D
21 {
22 private:
23  bool matrix_needs_update_ = true;
24  float scale_ = 1;
25  glm::vec2 position_;
26  glm::mat4 camera_matrix_;
27  glm::mat4 ortho_matrix_;
28 
29 public:
30  Camera2D(int screen_width = 1280, int screen_height = 720);
31 
32  // update camera location
33  void update(GlslProgram &program);
34  // camera movement
35  void move(const glm::vec2 &direction);
36 };
37 
38 } // yage
39 
40 #endif
glm::mat4 ortho_matrix_
Definition: camera2d.hpp:27
+Go to the documentation of this file.
1 /* ----------------------------------------------------------------------------
2  * camera2d.hpp
3  *
4  * Copyright (c) 2017 Yann Herklotz Grave <ymherklotz@gmail.com>
5  * MIT License, see LICENSE file for more details.
6  * ----------------------------------------------------------------------------
7  */
8 
9 #ifndef CAMERA_2D_HPP
10 #define CAMERA_2D_HPP
11 
12 #include "glslprogram.hpp"
13 
14 #include <glm/glm.hpp>
15 #include <glm/gtc/matrix_transform.hpp>
16 
17 namespace yage
18 {
19 
20 class Camera2D
21 {
22 private:
23  bool matrix_needs_update_ = true;
24  float scale_ = 1;
25  glm::vec2 position_;
26  glm::mat4 camera_matrix_;
27  glm::mat4 ortho_matrix_;
28 
29 public:
30  Camera2D(int screen_width = 1280, int screen_height = 720);
31 
32  // update camera location
33  void update(GlslProgram &program);
34  // camera movement
35  void move(const glm::vec2 &direction);
36 };
37 
38 } // namespace yage
39 
40 #endif
glm::mat4 ortho_matrix_
Definition: camera2d.hpp:27
float scale_
Definition: camera2d.hpp:24
bool matrix_needs_update_
Definition: camera2d.hpp:23
glm::mat4 camera_matrix_
Definition: camera2d.hpp:26
@@ -94,7 +94,7 @@ $(document).ready(function(){initNavTree('camera2d_8hpp_source.html','');});
glm::vec2 position_
Definition: camera2d.hpp:25
Definition: camera2d.hpp:20
-
Templated matrix class.
Definition: camera2d.hpp:17
+
Project namespace.
Definition: body.cpp:13
void move(const glm::vec2 &direction)
Definition: camera2d.cpp:39
Camera2D(int screen_width=1280, int screen_height=720)
Definition: camera2d.cpp:16
@@ -103,7 +103,7 @@ $(document).ready(function(){initNavTree('camera2d_8hpp_source.html','');});