2022-05-28 11:32:17 +00:00
|
|
|
#include "Graphics/Camera.h"
|
|
|
|
|
|
|
|
Camera::Camera(glm::vec3 position, glm::vec3 rotation, float zoom)
|
|
|
|
: Position(position), Rotation(rotation), Zoom(zoom) {
|
|
|
|
|
|
|
|
Front = glm::vec3(-1.0f, 0.0f, 0.0f);
|
|
|
|
Right = glm::vec3(0.0f, 0.0f, 1.0f);
|
|
|
|
Up = glm::vec3(0.0f, 1.0f, 0.0f);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
Camera::~Camera() {
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
glm::mat4 Camera::GetViewMatrix() {
|
|
|
|
return glm::lookAt(
|
|
|
|
Position,
|
|
|
|
Position + Front,
|
|
|
|
Up
|
|
|
|
);
|
2022-05-04 09:10:26 +00:00
|
|
|
}
|