Merge pull request #7 from lioncash/include

zeus: Amend inclusions
This commit is contained in:
Phillip Stephens 2019-09-01 11:06:45 -07:00 committed by GitHub
commit 050e86aae8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
32 changed files with 135 additions and 101 deletions

View File

@ -1,16 +1,16 @@
#pragma once #pragma once
#include "zeus/CVector3f.hpp" #include <cassert>
#include "zeus/CTransform.hpp"
#include "zeus/CPlane.hpp"
#include "zeus/CLineSeg.hpp" #include "zeus/CLineSeg.hpp"
#include "zeus/CPlane.hpp"
#include "zeus/CSphere.hpp" #include "zeus/CSphere.hpp"
#include "zeus/CTransform.hpp"
#include "zeus/CVector3f.hpp"
#include "zeus/Math.hpp" #include "zeus/Math.hpp"
#if ZE_ATHENA_TYPES #if ZE_ATHENA_TYPES
#include <athena/IStreamReader.hpp> #include <athena/IStreamReader.hpp>
#endif #endif
namespace zeus { namespace zeus {

View File

@ -1,8 +1,7 @@
#pragma once #pragma once
#include "Global.hpp" #include "zeus/CUnitVector.hpp"
#include "zeus/CVector3f.hpp" #include "zeus/CVector3f.hpp"
#include "CUnitVector.hpp"
namespace zeus { namespace zeus {
struct CAxisAngle : CVector3f { struct CAxisAngle : CVector3f {

View File

@ -1,19 +1,18 @@
#pragma once #pragma once
#include "Global.hpp" #include <algorithm>
#include <cassert>
#include <functional>
#include "zeus/CVector4f.hpp"
#include "zeus/Global.hpp"
#include "zeus/Math.hpp" #include "zeus/Math.hpp"
#include "CVector4f.hpp"
#if ZE_ATHENA_TYPES #if ZE_ATHENA_TYPES
#include <athena/FileReader.hpp>
#include "athena/FileReader.hpp" #include <athena/FileWriter.hpp>
#include "athena/FileWriter.hpp"
#endif #endif
#include <iostream>
#include <cassert>
#undef min #undef min
#undef max #undef max

View File

@ -4,6 +4,7 @@
namespace zeus { namespace zeus {
class CQuaternion; class CQuaternion;
class CTransform;
class CEulerAngles : public CVector3f { class CEulerAngles : public CVector3f {
public: public:

View File

@ -1,10 +1,13 @@
#pragma once #pragma once
#include "zeus/CPlane.hpp" #include "zeus/CPlane.hpp"
#include "zeus/CAABox.hpp"
#include "zeus/CProjection.hpp"
namespace zeus { namespace zeus {
class CAABox;
class CMatrix4f;
class CProjection;
class CSphere;
class CFrustum { class CFrustum {
CPlane planes[6]; CPlane planes[6];
bool valid = false; bool valid = false;

View File

@ -1,6 +1,5 @@
#pragma once #pragma once
#include "Global.hpp"
#include "zeus/CVector3f.hpp" #include "zeus/CVector3f.hpp"
namespace zeus { namespace zeus {

View File

@ -1,6 +1,5 @@
#pragma once #pragma once
#include "Global.hpp"
#include "zeus/CVector3f.hpp" #include "zeus/CVector3f.hpp"
namespace zeus { namespace zeus {

View File

@ -1,8 +1,7 @@
#pragma once #pragma once
#include "zeus/CVector3f.hpp"
#include "zeus/CTransform.hpp" #include "zeus/CTransform.hpp"
#include "zeus/Math.hpp" #include "zeus/CVector3f.hpp"
namespace zeus { namespace zeus {
struct CMRay { struct CMRay {

View File

@ -1,9 +1,9 @@
#pragma once #pragma once
#include "Global.hpp"
#include "zeus/CVector3f.hpp"
#include <cassert> #include <cassert>
#include <cstring>
#include "zeus/CVector3f.hpp"
#include "zeus/Global.hpp"
/* Column-major matrix class */ /* Column-major matrix class */
namespace zeus { namespace zeus {

View File

@ -1,8 +1,10 @@
#pragma once #pragma once
#include <cassert>
#include "zeus/CMatrix3f.hpp" #include "zeus/CMatrix3f.hpp"
#include "zeus/CVector4f.hpp"
#include "zeus/CVector3f.hpp" #include "zeus/CVector3f.hpp"
#include "zeus/CVector4f.hpp"
namespace zeus { namespace zeus {
class CMatrix4f { class CMatrix4f {

View File

@ -1,9 +1,12 @@
#pragma once #pragma once
#include "zeus/CAABox.hpp"
#include "zeus/CTransform.hpp" #include "zeus/CTransform.hpp"
#include "zeus/CVector3f.hpp" #include "zeus/CVector3f.hpp"
#include "zeus/CAABox.hpp"
#include "zeus/CMRay.hpp" #if ZE_ATHENA_TYPES
#include <athena/IStreamReader.hpp>
#endif
namespace zeus { namespace zeus {
class COBBox { class COBBox {

View File

@ -1,7 +1,9 @@
#pragma once #pragma once
#include "Global.hpp" #include <cassert>
#include "zeus/CVector3f.hpp" #include "zeus/CVector3f.hpp"
#include "zeus/Global.hpp"
#include "zeus/Math.hpp" #include "zeus/Math.hpp"
namespace zeus { namespace zeus {

View File

@ -1,10 +1,9 @@
#pragma once #pragma once
#include "Global.hpp"
#include "zeus/CMatrix4f.hpp"
#include <cstdlib>
#include <cstdio> #include <cstdio>
#include <cmath> #include <cstdlib>
#include "zeus/CMatrix4f.hpp"
namespace zeus { namespace zeus {
enum class EProjType { None = 0, Orthographic = 1, Perspective = 2 }; enum class EProjType { None = 0, Orthographic = 1, Perspective = 2 };

View File

@ -1,18 +1,17 @@
#pragma once #pragma once
#include "Global.hpp" #include <cmath>
#include "CAxisAngle.hpp"
#include "zeus/CVector3f.hpp" #include "zeus/CAxisAngle.hpp"
#include "zeus/CVector4f.hpp"
#include "zeus/CMatrix3f.hpp" #include "zeus/CMatrix3f.hpp"
#include "zeus/Math.hpp"
#include "zeus/CRelAngle.hpp" #include "zeus/CRelAngle.hpp"
#include "zeus/CTransform.hpp" #include "zeus/CTransform.hpp"
#include "zeus/CVector3f.hpp"
#include "zeus/CVector4f.hpp"
#include "zeus/Global.hpp"
#if ZE_ATHENA_TYPES #if ZE_ATHENA_TYPES
#include <athena/IStreamReader.hpp> #include <athena/IStreamReader.hpp>
#endif #endif
namespace zeus { namespace zeus {

View File

@ -1,9 +1,9 @@
#pragma once #pragma once
#include "zeus/CVector3f.hpp"
#include "zeus/Math.hpp"
#include <cmath> #include <cmath>
#include "zeus/Math.hpp"
namespace zeus { namespace zeus {
/** /**
* @brief The CRelAngle class represents relative angle in radians * @brief The CRelAngle class represents relative angle in radians

View File

@ -1,13 +1,14 @@
#pragma once #pragma once
#include "Global.hpp"
#include "zeus/CMatrix3f.hpp"
#include "zeus/CMatrix4f.hpp"
#include "zeus/CVector3f.hpp"
#include "zeus/CUnitVector.hpp"
#include <cstdint> #include <cstdint>
#include <cstdio> #include <cstdio>
#include "zeus/CMatrix3f.hpp"
#include "zeus/CMatrix4f.hpp"
#include "zeus/CUnitVector.hpp"
#include "zeus/CVector3f.hpp"
#include "zeus/Global.hpp"
namespace zeus { namespace zeus {
class CTransform { class CTransform {
public: public:

View File

@ -1,10 +1,14 @@
#pragma once #pragma once
#include "Global.hpp"
#include "zeus/Math.hpp"
#include "zeus/Math.hpp"
#include <cassert> #include <cassert>
#include "zeus/Global.hpp"
#include "zeus/Math.hpp"
#if ZE_ATHENA_TYPES
#include <athena/IStreamReader.hpp>
#endif
namespace zeus { namespace zeus {
class CVector2f { class CVector2f {
public: public:

View File

@ -1,14 +1,6 @@
#pragma once #pragma once
#include "Global.hpp" #include "zeus/CVector2f.hpp"
#include "zeus/Math.hpp"
#include "CVector2f.hpp"
#if ZE_ATHENA_TYPES
#include <athena/IStreamReader.hpp>
#endif
namespace zeus { namespace zeus {

View File

@ -1,9 +1,13 @@
#pragma once #pragma once
#include "athena/Types.hpp" #include <cassert>
#include "Global.hpp"
#include "zeus/Math.hpp"
#include "zeus/CVector3f.hpp" #include "zeus/CVector3f.hpp"
#include "zeus/Global.hpp"
#if ZE_ATHENA_TYPES
#include <athena/Types.hpp>
#endif
namespace zeus { namespace zeus {

View File

@ -1,11 +1,15 @@
#pragma once #pragma once
#include "Global.hpp" #include <cassert>
#include "zeus/Math.hpp" #include <cfloat>
#include <cmath>
#include "zeus/CVector2f.hpp" #include "zeus/CVector2f.hpp"
#include "zeus/Global.hpp"
#include "zeus/Math.hpp"
#if ZE_ATHENA_TYPES #if ZE_ATHENA_TYPES
#include "athena/IStreamReader.hpp" #include <athena/IStreamReader.hpp>
#endif #endif
namespace zeus { namespace zeus {

View File

@ -1,18 +1,16 @@
#pragma once #pragma once
#include "Global.hpp" #include <cassert>
#include <cfloat>
#include <cmath>
#include "zeus/CVector3f.hpp" #include "zeus/CVector3f.hpp"
#include "zeus/Global.hpp"
#if ZE_ATHENA_TYPES #if ZE_ATHENA_TYPES
#include <athena/IStreamReader.hpp>
#include "athena/IStreamReader.hpp"
#endif #endif
#include "zeus/Math.hpp"
#include <cfloat>
#include <cassert>
namespace zeus { namespace zeus {
class CColor; class CColor;

View File

@ -1,25 +1,25 @@
#pragma once #pragma once
#include "zeus/CAABox.hpp"
#include "zeus/CAxisAngle.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/CMatrix3f.hpp"
#include "zeus/CMatrix4f.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/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/CSphere.hpp"
#include "zeus/CFrustum.hpp" #include "zeus/CTransform.hpp"
#include "zeus/CMRay.hpp" #include "zeus/CUnitVector.hpp"
#include "zeus/CColor.hpp" #include "zeus/CVector2f.hpp"
#include "zeus/CVector3d.hpp"
#include "zeus/CVector3f.hpp"
#include "zeus/CVector4f.hpp"
#include "zeus/Global.hpp" #include "zeus/Global.hpp"
#include "zeus/Math.hpp" #include "zeus/Math.hpp"

View File

@ -1,5 +1,6 @@
#include "zeus/CColor.hpp" #include "zeus/CColor.hpp"
#include "zeus/CVector4f.hpp"
#include <algorithm>
namespace zeus { namespace zeus {
float hueToRgb(float p, float q, float t) { float hueToRgb(float p, float q, float t) {

View File

@ -1,5 +1,9 @@
#include "zeus/CEulerAngles.hpp" #include "zeus/CEulerAngles.hpp"
#include <cmath>
#include "zeus/CQuaternion.hpp" #include "zeus/CQuaternion.hpp"
#include "zeus/CTransform.hpp"
namespace zeus { namespace zeus {

View File

@ -1,5 +1,11 @@
#include "zeus/CFrustum.hpp" #include "zeus/CFrustum.hpp"
#include <cmath>
#include "zeus/CAABox.hpp"
#include "zeus/CProjection.hpp"
#include "zeus/CTransform.hpp"
namespace zeus { namespace zeus {
void CFrustum::updatePlanes(const CMatrix4f& viewMtx, const CMatrix4f& projection) { void CFrustum::updatePlanes(const CMatrix4f& viewMtx, const CMatrix4f& projection) {

View File

@ -1,5 +1,8 @@
#include "zeus/COBBox.hpp" #include "zeus/COBBox.hpp"
#include <cfloat>
#include <cmath>
namespace zeus { namespace zeus {
CAABox COBBox::calculateAABox(const CTransform& worldXf) const { CAABox COBBox::calculateAABox(const CTransform& worldXf) const {

View File

@ -1,6 +1,7 @@
#include "zeus/CProjection.hpp" #include "zeus/CProjection.hpp"
#include "zeus/Math.hpp"
#include <cassert> #include <cassert>
#include <cmath>
namespace zeus { namespace zeus {
void CProjection::_updateCachedMatrix() { void CProjection::_updateCachedMatrix() {

View File

@ -1,4 +1,7 @@
#include "zeus/CQuaternion.hpp" #include "zeus/CQuaternion.hpp"
#include <cmath>
#include "zeus/Math.hpp" #include "zeus/Math.hpp"
namespace zeus { namespace zeus {

View File

@ -1,5 +1,7 @@
#include "zeus/CTransform.hpp" #include "zeus/CTransform.hpp"
#include <cmath>
namespace zeus { namespace zeus {
CTransform CTransformFromEditorEuler(const CVector3f& eulerVec) { CTransform CTransformFromEditorEuler(const CVector3f& eulerVec) {
CTransform result; CTransform result;

View File

@ -1,8 +1,9 @@
#include "zeus/CVector2f.hpp" #include "zeus/CVector2f.hpp"
#include <memory.h>
#include <cmath> #include <algorithm>
#include <cassert> #include <cassert>
#include "zeus/Math.hpp" #include <cfloat>
#include <cmath>
namespace zeus { namespace zeus {
float CVector2f::getAngleDiff(const CVector2f& a, const CVector2f& b) { 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; return 0.f;
float dot = a.dot(b); 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) { CVector2f CVector2f::slerp(const CVector2f& a, const CVector2f& b, float t) {

View File

@ -1,9 +1,10 @@
#include "zeus/CVector3f.hpp" #include "zeus/CVector3f.hpp"
#include "zeus/CVector3d.hpp"
#include <memory.h> #include <algorithm>
#include <cmath>
#include <cassert> #include <cassert>
#include "zeus/Math.hpp" #include <cfloat>
#include <cmath>
#include "zeus/CRelAngle.hpp" #include "zeus/CRelAngle.hpp"
namespace zeus { namespace zeus {
@ -15,7 +16,7 @@ float CVector3f::getAngleDiff(const CVector3f& a, const CVector3f& b) {
return 0.f; return 0.f;
float dot = a.dot(b); 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) { CVector3f CVector3f::slerp(const CVector3f& a, const CVector3f& b, CRelAngle clampAngle) {

View File

@ -1,7 +1,12 @@
#include "zeus/Math.hpp" #include "zeus/Math.hpp"
#include <cfloat>
#include <cmath>
#include <cstring>
#include "zeus/CTransform.hpp" #include "zeus/CTransform.hpp"
#include "zeus/CVector3f.hpp"
#include "zeus/CVector2f.hpp" #include "zeus/CVector2f.hpp"
#include "zeus/CVector3f.hpp"
#if _WIN32 #if _WIN32
#include <intrin.h> #include <intrin.h>