Kinetic Visualization
 All Classes Functions Variables Pages
Camera.h
1 #pragma once
2 #include <glm\glm.hpp>
3 #include <glm\gtc\matrix_projection.hpp>
4 #include <glm\gtc\matrix_transform.hpp>
5 
6 class Camera
7 {
8 public:
12  Camera(void);
16  ~Camera(void);
17 
27  void SetProjection(float left, float right, float bottom, float top, float near_plane, float far_plane);
35  void SetProjection(float fovy, float aspect_ratio, float near_plane, float far_plane);
40  glm::mat4 GetProjection();
45  glm::mat4 GetViewMatrix(); //Diese Methode setzt CalcPlanes nicht mit!!!
50  glm::mat4 GetViewMatrix(unsigned int i); //Diese Methode setzt CalcPlanes nicht mit!!!
57  void SetViewMatrix(glm::vec3 p, glm::vec3 l, glm::vec3 u); //Diese Methode setzt CalcPlanes immer mit.
62  void SetViewMatrix(glm::mat4 matrix);
63 
68  glm::mat4 GetOldProjection();
73  glm::mat4 GetOldViewMatrix();
74 
79  glm::vec3 GetPosition();
84  glm::vec3 GetUpVector();
89  glm::vec3 GetCenterPositon();
90 
94  void SetActAsOldViewMatrix();
99 
103  glm::mat4 LookAt(glm::vec3 eye, glm::vec3 center, glm::vec3 up);
104 
108  int SetViewport(int width, int height);
112  int GetWidth();
116  int GetHeight();
117 
121  void SetEnvironmentMapping(bool env);
125  void SetViewMatrix(int z, glm::vec3 eye, glm::vec3 center, glm::vec3 up);
126 
127 private:
128  glm::mat4 m_projection;
129  glm::mat4 m_viewMatrix;
130  glm::mat4* m_viewMatrix_cpy;
131 
132  glm::mat4 m_old_ViewMatrix;
133  glm::mat4 m_old_ProjectionMatrix;
134 
135  float nearPlane;
136  float farPlane;
137 
138  int m_width;
139  int m_height;
140 
141 private:
142  glm::vec3 m_position;
143  glm::vec3 m_center;
144  glm::vec3 m_up;
145 
146  bool isEnvironmentMapping;
147 };
148