-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathviewerdata.h
36 lines (30 loc) · 832 Bytes
/
viewerdata.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#ifndef VIEWER_H
#define VIEWER_H
#include <utils.h>
class Camera{
public:
Vec pos, lookat, vup;
public:
Camera();
};
class ViewerData{
public:
Camera camera;
private:
float anglePespective;
float znear, zfar;
float win_width, win_height;
//atualiza matriz de projecao (para garantir o funcionamento da funcao gluUnProject)
//deve ser chamada toda vez que algum parametro deste objeto eh atualizado
void updateMatrix();
public:
ViewerData(); //default
// void pixelToWorld(const int wx, const int wy, Vec &posWorld);
Vec pixelToWorld(const int wx, const int wy)const;
void setWindowSize(int win_width, int win_height);
void setCamera(const Camera &camera);
void setPespective(float angleP, float znear, float zfar);
void setLookAt(const Vec &at);
void moveCamera(Vec newPosCam);
};
#endif