diff --git a/include/zeus/CMatrix3f.hpp b/include/zeus/CMatrix3f.hpp index 488c2f1..8581df5 100644 --- a/include/zeus/CMatrix3f.hpp +++ b/include/zeus/CMatrix3f.hpp @@ -22,13 +22,13 @@ public: constexpr CMatrix3f(float m00, float m01, float m02, float m10, float m11, float m12, float m20, float m21, float m22) : m{{m00, m10, m20}, {m01, m11, m21}, {m02, m12, m22}} {} - constexpr CMatrix3f(const CVector3f& scaleVec) { + CMatrix3f(const CVector3f& scaleVec) { m[0][0] = scaleVec[0]; m[1][1] = scaleVec[1]; m[2][2] = scaleVec[2]; } - constexpr CMatrix3f(float scale) : CMatrix3f(CVector3f(scale)) {} + CMatrix3f(float scale) : CMatrix3f(CVector3f(scale)) {} constexpr CMatrix3f(const CVector3f& r0, const CVector3f& r1, const CVector3f& r2) { m[0] = r0; diff --git a/include/zeus/CMatrix4f.hpp b/include/zeus/CMatrix4f.hpp index 304aef8..454f7b9 100644 --- a/include/zeus/CMatrix4f.hpp +++ b/include/zeus/CMatrix4f.hpp @@ -20,7 +20,7 @@ public: float m21, float m22, float m23, float m30, float m31, float m32, float m33) : m{{m00, m10, m20, m30}, {m01, m11, m21, m31}, {m02, m12, m22, m32}, {m03, m13, m23, m33}} {} - constexpr CMatrix4f(const CVector3f& scaleVec) { + CMatrix4f(const CVector3f& scaleVec) { m[0][0] = scaleVec[0]; m[1][1] = scaleVec[1]; m[2][2] = scaleVec[2]; @@ -49,10 +49,10 @@ public: } constexpr CMatrix4f(const CMatrix3f& other) { - m[0] = other.m[0]; - m[1] = other.m[1]; - m[2] = other.m[2]; - m[3] = CVector4f(0.f, 0.f, 0.f, 1.0f); + m[0].mSimd = other.m[0].mSimd; + m[1].mSimd = other.m[1].mSimd; + m[2].mSimd = other.m[2].mSimd; + m[3].mSimd = CVector4f(0.f, 0.f, 0.f, 1.0f).mSimd; } CMatrix4f& operator=(const CMatrix4f& other) { diff --git a/include/zeus/CTransform.hpp b/include/zeus/CTransform.hpp index 9e2b9cf..2883d54 100644 --- a/include/zeus/CTransform.hpp +++ b/include/zeus/CTransform.hpp @@ -231,7 +231,7 @@ public: CVector3f origin; }; -constexpr CTransform CTransformFromScaleVector(const CVector3f& scale) { return CTransform(CMatrix3f(scale)); } +inline CTransform CTransformFromScaleVector(const CVector3f& scale) { return CTransform(CMatrix3f(scale)); } CTransform CTransformFromEditorEuler(const CVector3f& eulerVec); diff --git a/include/zeus/CVector4f.hpp b/include/zeus/CVector4f.hpp index 8a252f8..8fed7c0 100644 --- a/include/zeus/CVector4f.hpp +++ b/include/zeus/CVector4f.hpp @@ -52,7 +52,7 @@ public: constexpr CVector4f(const CColor& other); - constexpr CVector4f(const CVector3f& other, float wIn = 1.f) : mSimd(other.mSimd) { mSimd[3] = wIn; } + CVector4f(const CVector3f& other, float wIn = 1.f) : mSimd(other.mSimd) { mSimd[3] = wIn; } static CVector4f ToClip(const zeus::CVector3f& v, float w) { return CVector4f(v * w, w); }