From 5c72e0048c3ce04ea2980e60e7009d2880a38ab6 Mon Sep 17 00:00:00 2001 From: Zach Date: Tue, 1 Oct 2024 21:47:27 -0400 Subject: [PATCH] fix: :rotating_light: Attempt to fix math defines not available for MS compiler --- include/cameras/PerspectiveCamera.hpp | 3 ++- include/materials/BlinnPhong.hpp | 3 ++- include/math/Matrix4x4.hpp | 3 ++- include/math/Vector3.hpp | 1 + include/renderers/Rasterizer.hpp | 1 + 5 files changed, 8 insertions(+), 3 deletions(-) diff --git a/include/cameras/PerspectiveCamera.hpp b/include/cameras/PerspectiveCamera.hpp index 257363e..7f6ac2c 100644 --- a/include/cameras/PerspectiveCamera.hpp +++ b/include/cameras/PerspectiveCamera.hpp @@ -1,3 +1,4 @@ +#define __USE_MATH_DEFINES #include "cameras/Camera.hpp" #include @@ -67,4 +68,4 @@ class PerspectiveCamera : public Camera { } // namespace t -#endif // PERSPECTIVECAMERA_HPP \ No newline at end of file +#endif // PERSPECTIVECAMERA_HPP diff --git a/include/materials/BlinnPhong.hpp b/include/materials/BlinnPhong.hpp index b9546a2..226e279 100644 --- a/include/materials/BlinnPhong.hpp +++ b/include/materials/BlinnPhong.hpp @@ -1,3 +1,4 @@ +#define __USE_MATH_DEFINES #include "materials/Material.hpp" #include @@ -89,4 +90,4 @@ class BlinnPhong : public Material { } // namespace t -#endif // BLINNPHONG_HPP \ No newline at end of file +#endif // BLINNPHONG_HPP diff --git a/include/math/Matrix4x4.hpp b/include/math/Matrix4x4.hpp index 0557b34..ef77897 100644 --- a/include/math/Matrix4x4.hpp +++ b/include/math/Matrix4x4.hpp @@ -1,3 +1,4 @@ +#define __USE_MATH_DEFINES #include "EulerRotation.hpp" #include "Matrix3x3.hpp" #include "Vector3.hpp" @@ -795,4 +796,4 @@ class Matrix4x4 { } // namespace t -#endif // MATRIX4X4_HPP \ No newline at end of file +#endif // MATRIX4X4_HPP diff --git a/include/math/Vector3.hpp b/include/math/Vector3.hpp index fc27a25..1bde595 100644 --- a/include/math/Vector3.hpp +++ b/include/math/Vector3.hpp @@ -1,3 +1,4 @@ +#define __USE_MATH_DEFINES #include "primitives/BufferAttribute.hpp" #include #include diff --git a/include/renderers/Rasterizer.hpp b/include/renderers/Rasterizer.hpp index d743dd0..7b1bd27 100644 --- a/include/renderers/Rasterizer.hpp +++ b/include/renderers/Rasterizer.hpp @@ -1,3 +1,4 @@ +#define __USE_MATH_DEFINES #include "cameras/Camera.hpp" #include "math/Matrix3x3.hpp" #include "primitives/Fragment.hpp"