Format code with clang-format.

This commit is contained in:
2021-07-04 13:12:34 +02:00
parent 9937a36526
commit f816f5f565
37 changed files with 470 additions and 465 deletions

View File

@@ -1,8 +1,8 @@
#include "Camera.h"
#include "eventActions.h"
#include <glm/gtc/matrix_transform.hpp>
#include <glm/ext/matrix_transform.hpp>
#include <glm/gtc/matrix_transform.hpp>
Camera::Camera(float fov, float aspectRatio)
{
@@ -19,7 +19,7 @@ void Camera::updateVPM()
void Camera::updateAspectRatio(float aspectRatio)
{
//projectionMatrix = glm::ortho(-2.0f, 2.0f, -2.0f, 2.0f, -10.f, 100.0f);
// projectionMatrix = glm::ortho(-2.0f, 2.0f, -2.0f, 2.0f, -10.f, 100.0f);
projectionMatrix = glm::perspective(fov / 2.0f, aspectRatio, 0.1f, 1000.0f);
updateVPM();
}
@@ -79,7 +79,7 @@ void Camera::updateDirectionFromMouseInput(double *cameraMouseActionRegister)
pitch += cameraMouseActionRegister[cameraMouseDeltaY];
if (pitch > 89.0f) {
pitch = 89.0f;
pitch = 89.0f;
}
if (pitch < -89.0f) {
pitch = -89.0f;