-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCamera.hpp
47 lines (35 loc) · 1.11 KB
/
Camera.hpp
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
37
38
39
40
41
42
43
44
45
46
47
#ifndef CCAMERA_H
#define CCAMERA_H
#include <GL/glut.h>
#include "Point.hpp"
#include "Vector.hpp"
class Camera {
public:
Point eye; //camera position
Point ref; //look at point
Vector viewup; //view up vector
GLfloat aspect, nearDist, farDist, viewAngle, W, H;
//Vector u, v, n; //view
Camera();
void set(Point Eye, Point look, Vector up);
void set(float ex, float ey, float ez, float lx, float ly, float lz, float upx, float upy, float upz);
void printCamera(void);
void setDefaultCamera();
void reset_camera();
void scene_3D();
void scene_2D();
void rotate(GLfloat rx, GLfloat rz, GLfloat ry, GLfloat angle);
void translate(GLfloat tx, GLfloat ty, GLfloat tz);
void changeLook(GLfloat tx, GLfloat ty, GLfloat tz);
void setViewVolume(float viewAngle, float aspect, float Near, float Far);
void setAspect(float aspect);
void turn(GLint direction);
/* another set of transforms*/
void roll(float angle);
void pitch(float angle);
void yaw(float angle);
void slide(double du, double dv, double dn);
/* */
void setProjectionMatrix();
};
#endif