283
|
1 #ifndef INCLUDED_CAMERA
|
|
2 #define INCLUDED_CAMERA
|
|
3
|
|
4 #ifndef INCLUDED_SCENE_GRAPH
|
|
5 # include "SceneGraph.h"
|
|
6 #endif
|
|
7
|
|
8 class Camera : public SceneGraph {
|
|
9 public:
|
|
10 Camera(float w = 640, float h = 480);
|
|
11 ~Camera(void);
|
|
12
|
|
13 float zd[4]; // direction z
|
|
14 float yd[4]; // direction y
|
|
15 float fov;
|
|
16 float near;
|
|
17 float far;
|
|
18
|
|
19 float *m_view;
|
|
20 float *m_pers;
|
|
21 float *m_screen;
|
|
22
|
|
23 void updateView(void);
|
|
24 void updatePerspective(float w, float h);
|
|
25 void updateScreen(float w, float h);
|
|
26
|
|
27 void setCamera(float *pose);
|
|
28 void update(float screen_w, float screen_h);
|
|
29 };
|
|
30
|
|
31 typedef Camera *CameraPtr;
|
|
32
|
|
33 #endif
|