-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCamera.cpp
More file actions
32 lines (25 loc) · 964 Bytes
/
Camera.cpp
File metadata and controls
32 lines (25 loc) · 964 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
#include "Camera.hpp"
namespace gps {
//Camera constructor
Camera::Camera(glm::vec3 cameraPosition, glm::vec3 cameraTarget, glm::vec3 cameraUp) {
//TODO
this->cameraPosition = cameraPosition;
this->cameraTarget = cameraTarget;
this->cameraUpDirection = cameraUp;
}
//return the view matrix, using the glm::lookAt() function
glm::mat4 Camera::getViewMatrix() {
//TODO
return glm::lookAt(cameraPosition, cameraTarget, this->cameraUpDirection);
}
//update the camera internal parameters following a camera move event
void Camera::move(MOVE_DIRECTION direction, float speed) {
//TODO
}
//update the camera internal parameters following a camera rotate event
//yaw - camera rotation around the y axis
//pitch - camera rotation around the x axis
void Camera::rotate(float pitch, float yaw) {
//TODO
}
}