YoggieEngine/BarinkEngine/graphics/Camera.cpp

22 lines
393 B
C++
Raw Normal View History

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