mirror of https://github.com/AxioDL/zeus.git
commit
050e86aae8
|
@ -1,16 +1,16 @@
|
|||
#pragma once
|
||||
|
||||
#include "zeus/CVector3f.hpp"
|
||||
#include "zeus/CTransform.hpp"
|
||||
#include "zeus/CPlane.hpp"
|
||||
#include <cassert>
|
||||
|
||||
#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 <athena/IStreamReader.hpp>
|
||||
|
||||
#endif
|
||||
|
||||
namespace zeus {
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -1,19 +1,18 @@
|
|||
#pragma once
|
||||
|
||||
#include "Global.hpp"
|
||||
#include <algorithm>
|
||||
#include <cassert>
|
||||
#include <functional>
|
||||
|
||||
#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 <athena/FileReader.hpp>
|
||||
#include <athena/FileWriter.hpp>
|
||||
#endif
|
||||
|
||||
#include <iostream>
|
||||
#include <cassert>
|
||||
|
||||
#undef min
|
||||
#undef max
|
||||
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
|
||||
namespace zeus {
|
||||
class CQuaternion;
|
||||
class CTransform;
|
||||
|
||||
class CEulerAngles : public CVector3f {
|
||||
public:
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
#pragma once
|
||||
|
||||
#include "Global.hpp"
|
||||
#include "zeus/CVector3f.hpp"
|
||||
|
||||
namespace zeus {
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
#pragma once
|
||||
|
||||
#include "Global.hpp"
|
||||
#include "zeus/CVector3f.hpp"
|
||||
|
||||
namespace zeus {
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
#pragma once
|
||||
|
||||
#include "Global.hpp"
|
||||
#include "zeus/CVector3f.hpp"
|
||||
#include <cassert>
|
||||
#include <cstring>
|
||||
|
||||
#include "zeus/CVector3f.hpp"
|
||||
#include "zeus/Global.hpp"
|
||||
|
||||
/* Column-major matrix class */
|
||||
namespace zeus {
|
||||
|
|
|
@ -1,8 +1,10 @@
|
|||
#pragma once
|
||||
|
||||
#include <cassert>
|
||||
|
||||
#include "zeus/CMatrix3f.hpp"
|
||||
#include "zeus/CVector4f.hpp"
|
||||
#include "zeus/CVector3f.hpp"
|
||||
#include "zeus/CVector4f.hpp"
|
||||
|
||||
namespace zeus {
|
||||
class CMatrix4f {
|
||||
|
|
|
@ -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 <athena/IStreamReader.hpp>
|
||||
#endif
|
||||
|
||||
namespace zeus {
|
||||
class COBBox {
|
||||
|
|
|
@ -1,7 +1,9 @@
|
|||
#pragma once
|
||||
|
||||
#include "Global.hpp"
|
||||
#include <cassert>
|
||||
|
||||
#include "zeus/CVector3f.hpp"
|
||||
#include "zeus/Global.hpp"
|
||||
#include "zeus/Math.hpp"
|
||||
|
||||
namespace zeus {
|
||||
|
|
|
@ -1,10 +1,9 @@
|
|||
#pragma once
|
||||
|
||||
#include "Global.hpp"
|
||||
#include "zeus/CMatrix4f.hpp"
|
||||
#include <cstdlib>
|
||||
#include <cstdio>
|
||||
#include <cmath>
|
||||
#include <cstdlib>
|
||||
|
||||
#include "zeus/CMatrix4f.hpp"
|
||||
|
||||
namespace zeus {
|
||||
enum class EProjType { None = 0, Orthographic = 1, Perspective = 2 };
|
||||
|
|
|
@ -1,18 +1,17 @@
|
|||
#pragma once
|
||||
|
||||
#include "Global.hpp"
|
||||
#include "CAxisAngle.hpp"
|
||||
#include "zeus/CVector3f.hpp"
|
||||
#include "zeus/CVector4f.hpp"
|
||||
#include <cmath>
|
||||
|
||||
#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 <athena/IStreamReader.hpp>
|
||||
|
||||
#endif
|
||||
|
||||
namespace zeus {
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
#pragma once
|
||||
|
||||
#include "zeus/CVector3f.hpp"
|
||||
#include "zeus/Math.hpp"
|
||||
#include <cmath>
|
||||
|
||||
#include "zeus/Math.hpp"
|
||||
|
||||
namespace zeus {
|
||||
/**
|
||||
* @brief The CRelAngle class represents relative angle in radians
|
||||
|
|
|
@ -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 <cstdint>
|
||||
#include <cstdio>
|
||||
|
||||
#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:
|
||||
|
|
|
@ -1,10 +1,14 @@
|
|||
#pragma once
|
||||
|
||||
#include "Global.hpp"
|
||||
#include "zeus/Math.hpp"
|
||||
#include "zeus/Math.hpp"
|
||||
#include <cassert>
|
||||
|
||||
#include "zeus/Global.hpp"
|
||||
#include "zeus/Math.hpp"
|
||||
|
||||
#if ZE_ATHENA_TYPES
|
||||
#include <athena/IStreamReader.hpp>
|
||||
#endif
|
||||
|
||||
namespace zeus {
|
||||
class CVector2f {
|
||||
public:
|
||||
|
|
|
@ -1,14 +1,6 @@
|
|||
#pragma once
|
||||
|
||||
#include "Global.hpp"
|
||||
#include "zeus/Math.hpp"
|
||||
#include "CVector2f.hpp"
|
||||
|
||||
#if ZE_ATHENA_TYPES
|
||||
|
||||
#include <athena/IStreamReader.hpp>
|
||||
|
||||
#endif
|
||||
#include "zeus/CVector2f.hpp"
|
||||
|
||||
namespace zeus {
|
||||
|
||||
|
|
|
@ -1,9 +1,13 @@
|
|||
#pragma once
|
||||
|
||||
#include "athena/Types.hpp"
|
||||
#include "Global.hpp"
|
||||
#include "zeus/Math.hpp"
|
||||
#include <cassert>
|
||||
|
||||
#include "zeus/CVector3f.hpp"
|
||||
#include "zeus/Global.hpp"
|
||||
|
||||
#if ZE_ATHENA_TYPES
|
||||
#include <athena/Types.hpp>
|
||||
#endif
|
||||
|
||||
namespace zeus {
|
||||
|
||||
|
|
|
@ -1,11 +1,15 @@
|
|||
#pragma once
|
||||
|
||||
#include "Global.hpp"
|
||||
#include "zeus/Math.hpp"
|
||||
#include <cassert>
|
||||
#include <cfloat>
|
||||
#include <cmath>
|
||||
|
||||
#include "zeus/CVector2f.hpp"
|
||||
#include "zeus/Global.hpp"
|
||||
#include "zeus/Math.hpp"
|
||||
|
||||
#if ZE_ATHENA_TYPES
|
||||
#include "athena/IStreamReader.hpp"
|
||||
#include <athena/IStreamReader.hpp>
|
||||
#endif
|
||||
|
||||
namespace zeus {
|
||||
|
|
|
@ -1,18 +1,16 @@
|
|||
#pragma once
|
||||
|
||||
#include "Global.hpp"
|
||||
#include <cassert>
|
||||
#include <cfloat>
|
||||
#include <cmath>
|
||||
|
||||
#include "zeus/CVector3f.hpp"
|
||||
#include "zeus/Global.hpp"
|
||||
|
||||
#if ZE_ATHENA_TYPES
|
||||
|
||||
#include "athena/IStreamReader.hpp"
|
||||
|
||||
#include <athena/IStreamReader.hpp>
|
||||
#endif
|
||||
|
||||
#include "zeus/Math.hpp"
|
||||
#include <cfloat>
|
||||
#include <cassert>
|
||||
|
||||
namespace zeus {
|
||||
class CColor;
|
||||
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
#include "zeus/CColor.hpp"
|
||||
#include "zeus/CVector4f.hpp"
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
namespace zeus {
|
||||
float hueToRgb(float p, float q, float t) {
|
||||
|
|
|
@ -1,5 +1,9 @@
|
|||
#include "zeus/CEulerAngles.hpp"
|
||||
|
||||
#include <cmath>
|
||||
|
||||
#include "zeus/CQuaternion.hpp"
|
||||
#include "zeus/CTransform.hpp"
|
||||
|
||||
namespace zeus {
|
||||
|
||||
|
|
|
@ -1,5 +1,11 @@
|
|||
#include "zeus/CFrustum.hpp"
|
||||
|
||||
#include <cmath>
|
||||
|
||||
#include "zeus/CAABox.hpp"
|
||||
#include "zeus/CProjection.hpp"
|
||||
#include "zeus/CTransform.hpp"
|
||||
|
||||
namespace zeus {
|
||||
|
||||
void CFrustum::updatePlanes(const CMatrix4f& viewMtx, const CMatrix4f& projection) {
|
||||
|
|
|
@ -1,5 +1,8 @@
|
|||
#include "zeus/COBBox.hpp"
|
||||
|
||||
#include <cfloat>
|
||||
#include <cmath>
|
||||
|
||||
namespace zeus {
|
||||
|
||||
CAABox COBBox::calculateAABox(const CTransform& worldXf) const {
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
#include "zeus/CProjection.hpp"
|
||||
#include "zeus/Math.hpp"
|
||||
|
||||
#include <cassert>
|
||||
#include <cmath>
|
||||
|
||||
namespace zeus {
|
||||
void CProjection::_updateCachedMatrix() {
|
||||
|
|
|
@ -1,4 +1,7 @@
|
|||
#include "zeus/CQuaternion.hpp"
|
||||
|
||||
#include <cmath>
|
||||
|
||||
#include "zeus/Math.hpp"
|
||||
|
||||
namespace zeus {
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
#include "zeus/CTransform.hpp"
|
||||
|
||||
#include <cmath>
|
||||
|
||||
namespace zeus {
|
||||
CTransform CTransformFromEditorEuler(const CVector3f& eulerVec) {
|
||||
CTransform result;
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
#include "zeus/CVector2f.hpp"
|
||||
#include <memory.h>
|
||||
#include <cmath>
|
||||
|
||||
#include <algorithm>
|
||||
#include <cassert>
|
||||
#include "zeus/Math.hpp"
|
||||
#include <cfloat>
|
||||
#include <cmath>
|
||||
|
||||
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) {
|
||||
|
|
|
@ -1,9 +1,10 @@
|
|||
#include "zeus/CVector3f.hpp"
|
||||
#include "zeus/CVector3d.hpp"
|
||||
#include <memory.h>
|
||||
#include <cmath>
|
||||
|
||||
#include <algorithm>
|
||||
#include <cassert>
|
||||
#include "zeus/Math.hpp"
|
||||
#include <cfloat>
|
||||
#include <cmath>
|
||||
|
||||
#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) {
|
||||
|
|
|
@ -1,7 +1,12 @@
|
|||
#include "zeus/Math.hpp"
|
||||
|
||||
#include <cfloat>
|
||||
#include <cmath>
|
||||
#include <cstring>
|
||||
|
||||
#include "zeus/CTransform.hpp"
|
||||
#include "zeus/CVector3f.hpp"
|
||||
#include "zeus/CVector2f.hpp"
|
||||
#include "zeus/CVector3f.hpp"
|
||||
|
||||
#if _WIN32
|
||||
#include <intrin.h>
|
||||
|
|
Loading…
Reference in New Issue