PanoramaViewer
 All Classes Namespaces Files Functions Variables Macros Pages
Camera.h
Go to the documentation of this file.
1 /*
2  * Camera.h
3  *
4  * Created on: 26 juin 2013
5  * Author: hallison
6  */
7 
8 #ifndef CAMERA_H_
9 #define CAMERA_H_
10 
11 #include <GLES2/gl2.h>
12 
13 #include "Math/Matrix4.h"
14 #include "Math/Vector3.h"
15 
16 namespace LayerSceneGraph {
20 class Camera {
21 private:
25 
26  GLfloat near;
27  GLfloat far;
28  GLfloat angleOfView;
29  GLuint width;
30  GLuint height;
31 
33 public:
34  Camera();
35  Camera(GLfloat near, GLfloat far);
36  virtual ~Camera();
37 
38  void buildPerspective(GLuint width, GLuint height, GLfloat angleOfView);
39 
40  GLfloat *getModelMatrix();
41  GLfloat *getViewMatrix();
42  GLfloat *getProjectionMatrix();
43  GLfloat *getModelViewMatrix();
44 
45  void setModelMatrix(GLfloat *matrix);
46  void setViewMatrix(GLfloat *matrix);
47  void setProjectionMatrix(GLfloat *matrix);
48 
49  static GLfloat toRadian(GLfloat angle);
50 
51  GLuint getWidth();
52  GLuint getHeight();
53  GLfloat getAngleOfView();
54  GLfloat getAspectRatio();
55  GLfloat getNearDistance();
56  GLfloat getFarDistance();
57 
61 
62 };
63 
64 } /* namespace LayerSceneGraph */
65 #endif /* CAMERA_H_ */