YoggieEngine/MyGraphicsEngine/Camera.cpp
Nigel Barink 9c92cc05b7 Added Gorrilla-Audio and Tinygltf Library
Started laying out a assetManager / ModelImporter
2022-05-04 11:11:57 +02:00

22 lines
422 B
C++

#include <MyGraphicsEngine/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
);
}