-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCamera.h
More file actions
33 lines (25 loc) · 778 Bytes
/
Camera.h
File metadata and controls
33 lines (25 loc) · 778 Bytes
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
#ifndef CAMERA_H
#define CAMERA_H
/// GL libraries
#include <GL/gl.h>
#include <GL/glut.h>
/// C libraries
#include <cstdio>
#include <cstdlib>
/// Other libraries and classes
#include <math.h>
class Camera
{
public:
// Constructor
Camera();
// Display methods
void positioning(); // Realize the necessary transformations to positioning the 3D models
// Modification methods
void rotateOnMouse(int x, int y, int screenWidth, int screenHeight); // Rotates the camera with the mouse position
void translateOnKeyboard(unsigned char key);
private:
float x, y, z; // The coordinates of camera
float rotX, rotY; // The rotation of camera
};
#endif // CAMERA_H