Revert "Indentation style changed to Horstmann"
This reverts commit f2259f712d.
Conflicts:
src/GameWorld.cpp
src/Systems/PhysicsSystem.cpp
This commit is contained in:
+18
-9
@@ -2,7 +2,8 @@
|
||||
#include "Camera.h"
|
||||
|
||||
Camera::Camera(float yFOV, float aspectRatio, float nearClip, float farClip)
|
||||
{ m_FOV = yFOV;
|
||||
{
|
||||
m_FOV = yFOV;
|
||||
m_AspectRatio = aspectRatio;
|
||||
m_NearClip = nearClip;
|
||||
m_FarClip = farClip;
|
||||
@@ -34,18 +35,21 @@ Camera::Camera(float yFOV, float aspectRatio, float nearClip, float farClip)
|
||||
//}
|
||||
|
||||
void Camera::AspectRatio(float val)
|
||||
{ m_AspectRatio = val;
|
||||
{
|
||||
m_AspectRatio = val;
|
||||
UpdateProjectionMatrix();
|
||||
}
|
||||
|
||||
void Camera::Position(glm::vec3 val)
|
||||
{ m_Position = val;
|
||||
{
|
||||
m_Position = val;
|
||||
UpdateViewMatrix();
|
||||
}
|
||||
|
||||
|
||||
void Camera::Orientation(glm::quat val)
|
||||
{ m_Orientation = val;
|
||||
{
|
||||
m_Orientation = val;
|
||||
UpdateViewMatrix();
|
||||
}
|
||||
|
||||
@@ -62,7 +66,8 @@ void Camera::Orientation(glm::quat val)
|
||||
//}
|
||||
|
||||
void Camera::UpdateProjectionMatrix()
|
||||
{ m_ProjectionMatrix = glm::perspective(
|
||||
{
|
||||
m_ProjectionMatrix = glm::perspective(
|
||||
m_FOV,
|
||||
m_AspectRatio,
|
||||
m_NearClip,
|
||||
@@ -71,20 +76,24 @@ void Camera::UpdateProjectionMatrix()
|
||||
}
|
||||
|
||||
void Camera::UpdateViewMatrix()
|
||||
{ m_ViewMatrix = glm::translate(glm::toMat4(m_Orientation), -m_Position);
|
||||
{
|
||||
m_ViewMatrix = glm::translate(glm::toMat4(m_Orientation), -m_Position);
|
||||
}
|
||||
|
||||
void Camera::FOV(float val)
|
||||
{ m_FOV = val;
|
||||
{
|
||||
m_FOV = val;
|
||||
UpdateProjectionMatrix();
|
||||
}
|
||||
|
||||
void Camera::NearClip(float val)
|
||||
{ m_NearClip = val;
|
||||
{
|
||||
m_NearClip = val;
|
||||
UpdateProjectionMatrix();
|
||||
}
|
||||
|
||||
void Camera::FarClip(float val)
|
||||
{ m_FarClip = val;
|
||||
{
|
||||
m_FarClip = val;
|
||||
UpdateProjectionMatrix();
|
||||
}
|
||||
Reference in New Issue
Block a user