diff --git a/include/zeus/CAABox.hpp b/include/zeus/CAABox.hpp index c010f72..48470bf 100644 --- a/include/zeus/CAABox.hpp +++ b/include/zeus/CAABox.hpp @@ -1,16 +1,16 @@ #pragma once -#include "zeus/CVector3f.hpp" -#include "zeus/CTransform.hpp" -#include "zeus/CPlane.hpp" +#include + #include "zeus/CLineSeg.hpp" +#include "zeus/CPlane.hpp" #include "zeus/CSphere.hpp" +#include "zeus/CTransform.hpp" +#include "zeus/CVector3f.hpp" #include "zeus/Math.hpp" #if ZE_ATHENA_TYPES - #include - #endif namespace zeus { diff --git a/include/zeus/CAxisAngle.hpp b/include/zeus/CAxisAngle.hpp index cbc3b4c..fc5e1d1 100644 --- a/include/zeus/CAxisAngle.hpp +++ b/include/zeus/CAxisAngle.hpp @@ -1,8 +1,7 @@ #pragma once -#include "Global.hpp" +#include "zeus/CUnitVector.hpp" #include "zeus/CVector3f.hpp" -#include "CUnitVector.hpp" namespace zeus { struct CAxisAngle : CVector3f { diff --git a/include/zeus/CColor.hpp b/include/zeus/CColor.hpp index 64b0e9e..6203eb1 100644 --- a/include/zeus/CColor.hpp +++ b/include/zeus/CColor.hpp @@ -1,19 +1,18 @@ #pragma once -#include "Global.hpp" +#include +#include +#include + +#include "zeus/CVector4f.hpp" +#include "zeus/Global.hpp" #include "zeus/Math.hpp" -#include "CVector4f.hpp" #if ZE_ATHENA_TYPES - -#include "athena/FileReader.hpp" -#include "athena/FileWriter.hpp" - +#include +#include #endif -#include -#include - #undef min #undef max diff --git a/include/zeus/CEulerAngles.hpp b/include/zeus/CEulerAngles.hpp index ec2394d..4fed150 100644 --- a/include/zeus/CEulerAngles.hpp +++ b/include/zeus/CEulerAngles.hpp @@ -4,6 +4,7 @@ namespace zeus { class CQuaternion; +class CTransform; class CEulerAngles : public CVector3f { public: diff --git a/include/zeus/CFrustum.hpp b/include/zeus/CFrustum.hpp index 606c0ad..54d0d29 100644 --- a/include/zeus/CFrustum.hpp +++ b/include/zeus/CFrustum.hpp @@ -1,10 +1,13 @@ #pragma once #include "zeus/CPlane.hpp" -#include "zeus/CAABox.hpp" -#include "zeus/CProjection.hpp" namespace zeus { +class CAABox; +class CMatrix4f; +class CProjection; +class CSphere; + class CFrustum { CPlane planes[6]; bool valid = false; diff --git a/include/zeus/CLine.hpp b/include/zeus/CLine.hpp index 5c3e85d..78b011a 100644 --- a/include/zeus/CLine.hpp +++ b/include/zeus/CLine.hpp @@ -1,6 +1,5 @@ #pragma once -#include "Global.hpp" #include "zeus/CVector3f.hpp" namespace zeus { diff --git a/include/zeus/CLineSeg.hpp b/include/zeus/CLineSeg.hpp index 6885cfc..43027cd 100644 --- a/include/zeus/CLineSeg.hpp +++ b/include/zeus/CLineSeg.hpp @@ -1,6 +1,5 @@ #pragma once -#include "Global.hpp" #include "zeus/CVector3f.hpp" namespace zeus { diff --git a/include/zeus/CMRay.hpp b/include/zeus/CMRay.hpp index 7ab974a..cbbf0d5 100644 --- a/include/zeus/CMRay.hpp +++ b/include/zeus/CMRay.hpp @@ -1,8 +1,7 @@ #pragma once -#include "zeus/CVector3f.hpp" #include "zeus/CTransform.hpp" -#include "zeus/Math.hpp" +#include "zeus/CVector3f.hpp" namespace zeus { struct CMRay { diff --git a/include/zeus/CMatrix3f.hpp b/include/zeus/CMatrix3f.hpp index 8581df5..74935f3 100644 --- a/include/zeus/CMatrix3f.hpp +++ b/include/zeus/CMatrix3f.hpp @@ -1,9 +1,9 @@ #pragma once -#include "Global.hpp" -#include "zeus/CVector3f.hpp" #include -#include + +#include "zeus/CVector3f.hpp" +#include "zeus/Global.hpp" /* Column-major matrix class */ namespace zeus { diff --git a/include/zeus/CMatrix4f.hpp b/include/zeus/CMatrix4f.hpp index 454f7b9..f085cc0 100644 --- a/include/zeus/CMatrix4f.hpp +++ b/include/zeus/CMatrix4f.hpp @@ -1,8 +1,10 @@ #pragma once +#include + #include "zeus/CMatrix3f.hpp" -#include "zeus/CVector4f.hpp" #include "zeus/CVector3f.hpp" +#include "zeus/CVector4f.hpp" namespace zeus { class CMatrix4f { diff --git a/include/zeus/COBBox.hpp b/include/zeus/COBBox.hpp index c9549c3..fca6f5e 100644 --- a/include/zeus/COBBox.hpp +++ b/include/zeus/COBBox.hpp @@ -1,9 +1,12 @@ #pragma once +#include "zeus/CAABox.hpp" #include "zeus/CTransform.hpp" #include "zeus/CVector3f.hpp" -#include "zeus/CAABox.hpp" -#include "zeus/CMRay.hpp" + +#if ZE_ATHENA_TYPES +#include +#endif namespace zeus { class COBBox { diff --git a/include/zeus/CPlane.hpp b/include/zeus/CPlane.hpp index e478a80..d4102aa 100644 --- a/include/zeus/CPlane.hpp +++ b/include/zeus/CPlane.hpp @@ -1,7 +1,9 @@ #pragma once -#include "Global.hpp" +#include + #include "zeus/CVector3f.hpp" +#include "zeus/Global.hpp" #include "zeus/Math.hpp" namespace zeus { diff --git a/include/zeus/CProjection.hpp b/include/zeus/CProjection.hpp index 04261e6..5852b6f 100644 --- a/include/zeus/CProjection.hpp +++ b/include/zeus/CProjection.hpp @@ -1,10 +1,9 @@ #pragma once -#include "Global.hpp" -#include "zeus/CMatrix4f.hpp" -#include #include -#include +#include + +#include "zeus/CMatrix4f.hpp" namespace zeus { enum class EProjType { None = 0, Orthographic = 1, Perspective = 2 }; diff --git a/include/zeus/CQuaternion.hpp b/include/zeus/CQuaternion.hpp index 1f42a10..1ff7425 100644 --- a/include/zeus/CQuaternion.hpp +++ b/include/zeus/CQuaternion.hpp @@ -1,18 +1,17 @@ #pragma once -#include "Global.hpp" -#include "CAxisAngle.hpp" -#include "zeus/CVector3f.hpp" -#include "zeus/CVector4f.hpp" +#include + +#include "zeus/CAxisAngle.hpp" #include "zeus/CMatrix3f.hpp" -#include "zeus/Math.hpp" #include "zeus/CRelAngle.hpp" #include "zeus/CTransform.hpp" +#include "zeus/CVector3f.hpp" +#include "zeus/CVector4f.hpp" +#include "zeus/Global.hpp" #if ZE_ATHENA_TYPES - #include - #endif namespace zeus { diff --git a/include/zeus/CRelAngle.hpp b/include/zeus/CRelAngle.hpp index 4f0afa2..11b1182 100644 --- a/include/zeus/CRelAngle.hpp +++ b/include/zeus/CRelAngle.hpp @@ -1,9 +1,9 @@ #pragma once -#include "zeus/CVector3f.hpp" -#include "zeus/Math.hpp" #include +#include "zeus/Math.hpp" + namespace zeus { /** * @brief The CRelAngle class represents relative angle in radians diff --git a/include/zeus/CTransform.hpp b/include/zeus/CTransform.hpp index 1e1d8ef..c897cae 100644 --- a/include/zeus/CTransform.hpp +++ b/include/zeus/CTransform.hpp @@ -1,13 +1,14 @@ #pragma once -#include "Global.hpp" -#include "zeus/CMatrix3f.hpp" -#include "zeus/CMatrix4f.hpp" -#include "zeus/CVector3f.hpp" -#include "zeus/CUnitVector.hpp" #include #include +#include "zeus/CMatrix3f.hpp" +#include "zeus/CMatrix4f.hpp" +#include "zeus/CUnitVector.hpp" +#include "zeus/CVector3f.hpp" +#include "zeus/Global.hpp" + namespace zeus { class CTransform { public: diff --git a/include/zeus/CVector2f.hpp b/include/zeus/CVector2f.hpp index 0125c6a..48ba6c2 100644 --- a/include/zeus/CVector2f.hpp +++ b/include/zeus/CVector2f.hpp @@ -1,10 +1,14 @@ #pragma once -#include "Global.hpp" -#include "zeus/Math.hpp" -#include "zeus/Math.hpp" #include +#include "zeus/Global.hpp" +#include "zeus/Math.hpp" + +#if ZE_ATHENA_TYPES +#include +#endif + namespace zeus { class CVector2f { public: diff --git a/include/zeus/CVector2i.hpp b/include/zeus/CVector2i.hpp index b0736fc..ecb8354 100644 --- a/include/zeus/CVector2i.hpp +++ b/include/zeus/CVector2i.hpp @@ -1,14 +1,6 @@ #pragma once -#include "Global.hpp" -#include "zeus/Math.hpp" -#include "CVector2f.hpp" - -#if ZE_ATHENA_TYPES - -#include - -#endif +#include "zeus/CVector2f.hpp" namespace zeus { diff --git a/include/zeus/CVector3d.hpp b/include/zeus/CVector3d.hpp index 87728af..b57a234 100644 --- a/include/zeus/CVector3d.hpp +++ b/include/zeus/CVector3d.hpp @@ -1,9 +1,13 @@ #pragma once -#include "athena/Types.hpp" -#include "Global.hpp" -#include "zeus/Math.hpp" +#include + #include "zeus/CVector3f.hpp" +#include "zeus/Global.hpp" + +#if ZE_ATHENA_TYPES +#include +#endif namespace zeus { diff --git a/include/zeus/CVector3f.hpp b/include/zeus/CVector3f.hpp index da46826..5827f73 100644 --- a/include/zeus/CVector3f.hpp +++ b/include/zeus/CVector3f.hpp @@ -1,11 +1,15 @@ #pragma once -#include "Global.hpp" -#include "zeus/Math.hpp" +#include +#include +#include + #include "zeus/CVector2f.hpp" +#include "zeus/Global.hpp" +#include "zeus/Math.hpp" #if ZE_ATHENA_TYPES -#include "athena/IStreamReader.hpp" +#include #endif namespace zeus { diff --git a/include/zeus/CVector4f.hpp b/include/zeus/CVector4f.hpp index 8fed7c0..c7ab42e 100644 --- a/include/zeus/CVector4f.hpp +++ b/include/zeus/CVector4f.hpp @@ -1,18 +1,16 @@ #pragma once -#include "Global.hpp" +#include +#include +#include + #include "zeus/CVector3f.hpp" +#include "zeus/Global.hpp" #if ZE_ATHENA_TYPES - -#include "athena/IStreamReader.hpp" - +#include #endif -#include "zeus/Math.hpp" -#include -#include - namespace zeus { class CColor; diff --git a/include/zeus/zeus.hpp b/include/zeus/zeus.hpp index dd3c4d5..f018f06 100644 --- a/include/zeus/zeus.hpp +++ b/include/zeus/zeus.hpp @@ -1,25 +1,25 @@ #pragma once +#include "zeus/CAABox.hpp" #include "zeus/CAxisAngle.hpp" -#include "zeus/CRelAngle.hpp" +#include "zeus/CColor.hpp" +#include "zeus/CFrustum.hpp" +#include "zeus/CLineSeg.hpp" +#include "zeus/CMRay.hpp" #include "zeus/CMatrix3f.hpp" #include "zeus/CMatrix4f.hpp" -#include "zeus/CProjection.hpp" -#include "zeus/CTransform.hpp" -#include "zeus/CQuaternion.hpp" -#include "zeus/CVector2f.hpp" -#include "zeus/CVector3f.hpp" -#include "zeus/CVector3d.hpp" -#include "zeus/CVector4f.hpp" -#include "zeus/CUnitVector.hpp" -#include "zeus/CRectangle.hpp" -#include "zeus/CPlane.hpp" -#include "zeus/CLineSeg.hpp" -#include "zeus/CAABox.hpp" #include "zeus/COBBox.hpp" +#include "zeus/CPlane.hpp" +#include "zeus/CProjection.hpp" +#include "zeus/CQuaternion.hpp" +#include "zeus/CRectangle.hpp" +#include "zeus/CRelAngle.hpp" #include "zeus/CSphere.hpp" -#include "zeus/CFrustum.hpp" -#include "zeus/CMRay.hpp" -#include "zeus/CColor.hpp" +#include "zeus/CTransform.hpp" +#include "zeus/CUnitVector.hpp" +#include "zeus/CVector2f.hpp" +#include "zeus/CVector3d.hpp" +#include "zeus/CVector3f.hpp" +#include "zeus/CVector4f.hpp" #include "zeus/Global.hpp" #include "zeus/Math.hpp" diff --git a/src/CColor.cpp b/src/CColor.cpp index 4439bd8..083a0e5 100644 --- a/src/CColor.cpp +++ b/src/CColor.cpp @@ -1,5 +1,6 @@ #include "zeus/CColor.hpp" -#include "zeus/CVector4f.hpp" + +#include namespace zeus { float hueToRgb(float p, float q, float t) { diff --git a/src/CEulerAngles.cpp b/src/CEulerAngles.cpp index 82d49ca..c25f1bd 100644 --- a/src/CEulerAngles.cpp +++ b/src/CEulerAngles.cpp @@ -1,5 +1,9 @@ #include "zeus/CEulerAngles.hpp" + +#include + #include "zeus/CQuaternion.hpp" +#include "zeus/CTransform.hpp" namespace zeus { diff --git a/src/CFrustum.cpp b/src/CFrustum.cpp index 85945aa..c65347e 100644 --- a/src/CFrustum.cpp +++ b/src/CFrustum.cpp @@ -1,5 +1,11 @@ #include "zeus/CFrustum.hpp" +#include + +#include "zeus/CAABox.hpp" +#include "zeus/CProjection.hpp" +#include "zeus/CTransform.hpp" + namespace zeus { void CFrustum::updatePlanes(const CMatrix4f& viewMtx, const CMatrix4f& projection) { diff --git a/src/COBBox.cpp b/src/COBBox.cpp index d520a17..500e718 100644 --- a/src/COBBox.cpp +++ b/src/COBBox.cpp @@ -1,5 +1,8 @@ #include "zeus/COBBox.hpp" +#include +#include + namespace zeus { CAABox COBBox::calculateAABox(const CTransform& worldXf) const { diff --git a/src/CProjection.cpp b/src/CProjection.cpp index 2d48acf..0b330a6 100644 --- a/src/CProjection.cpp +++ b/src/CProjection.cpp @@ -1,6 +1,7 @@ #include "zeus/CProjection.hpp" -#include "zeus/Math.hpp" + #include +#include namespace zeus { void CProjection::_updateCachedMatrix() { diff --git a/src/CQuaternion.cpp b/src/CQuaternion.cpp index da52597..75f0194 100644 --- a/src/CQuaternion.cpp +++ b/src/CQuaternion.cpp @@ -1,4 +1,7 @@ #include "zeus/CQuaternion.hpp" + +#include + #include "zeus/Math.hpp" namespace zeus { diff --git a/src/CTransform.cpp b/src/CTransform.cpp index 00e3fdf..be92193 100644 --- a/src/CTransform.cpp +++ b/src/CTransform.cpp @@ -1,5 +1,7 @@ #include "zeus/CTransform.hpp" +#include + namespace zeus { CTransform CTransformFromEditorEuler(const CVector3f& eulerVec) { CTransform result; diff --git a/src/CVector2f.cpp b/src/CVector2f.cpp index cf22192..a63768b 100644 --- a/src/CVector2f.cpp +++ b/src/CVector2f.cpp @@ -1,8 +1,9 @@ #include "zeus/CVector2f.hpp" -#include -#include + +#include #include -#include "zeus/Math.hpp" +#include +#include namespace zeus { float CVector2f::getAngleDiff(const CVector2f& a, const CVector2f& b) { @@ -13,7 +14,7 @@ float CVector2f::getAngleDiff(const CVector2f& a, const CVector2f& b) { return 0.f; float dot = a.dot(b); - return std::acos(zeus::clamp(-1.f, dot / (mag1 * mag2), 1.f)); + return std::acos(std::clamp(-1.f, dot / (mag1 * mag2), 1.f)); } CVector2f CVector2f::slerp(const CVector2f& a, const CVector2f& b, float t) { diff --git a/src/CVector3f.cpp b/src/CVector3f.cpp index 6559dfe..53cdb4b 100644 --- a/src/CVector3f.cpp +++ b/src/CVector3f.cpp @@ -1,9 +1,10 @@ #include "zeus/CVector3f.hpp" -#include "zeus/CVector3d.hpp" -#include -#include + +#include #include -#include "zeus/Math.hpp" +#include +#include + #include "zeus/CRelAngle.hpp" namespace zeus { @@ -15,7 +16,7 @@ float CVector3f::getAngleDiff(const CVector3f& a, const CVector3f& b) { return 0.f; float dot = a.dot(b); - return std::acos(zeus::clamp(-1.f, dot / (mag1 * mag2), 1.f)); + return std::acos(std::clamp(-1.f, dot / (mag1 * mag2), 1.f)); } CVector3f CVector3f::slerp(const CVector3f& a, const CVector3f& b, CRelAngle clampAngle) { diff --git a/src/Math.cpp b/src/Math.cpp index 8213b52..24869d2 100644 --- a/src/Math.cpp +++ b/src/Math.cpp @@ -1,7 +1,12 @@ #include "zeus/Math.hpp" + +#include +#include +#include + #include "zeus/CTransform.hpp" -#include "zeus/CVector3f.hpp" #include "zeus/CVector2f.hpp" +#include "zeus/CVector3f.hpp" #if _WIN32 #include