diff --git a/include/Nazara/Math/Matrix4.hpp b/include/Nazara/Math/Matrix4.hpp index e618ca74a..b69f0f00d 100644 --- a/include/Nazara/Math/Matrix4.hpp +++ b/include/Nazara/Math/Matrix4.hpp @@ -61,7 +61,7 @@ class NzMatrix4 NzMatrix4& MakeRotation(const NzQuaternion& rotation); NzMatrix4& MakeScale(const NzVector3& scale); NzMatrix4& MakeTranslation(const NzVector3& translation); - NzMatrix4& MakeTransform(const NzVector3& translation, const NzVector3& scale, const NzQuaternion& rotation); + NzMatrix4& MakeTransform(const NzVector3& translation, const NzQuaternion& rotation, const NzVector3& scale); NzMatrix4& MakeZero(); NzMatrix4& Set(T r11, T r12, T r13, T r14, @@ -112,7 +112,7 @@ class NzMatrix4 static NzMatrix4 Rotate(const NzQuaternion& rotation); static NzMatrix4 Scale(const NzVector3& scale); static NzMatrix4 Translate(const NzVector3& translation); - static NzMatrix4 Transform(const NzVector3& translation, const NzVector3& scale, const NzQuaternion& rotation); + static NzMatrix4 Transform(const NzVector3& translation, const NzQuaternion& rotation, const NzVector3& scale); static NzMatrix4 Zero(); T m11, m12, m13, m14, diff --git a/include/Nazara/Math/Matrix4.inl b/include/Nazara/Math/Matrix4.inl index 094226f02..6d3e26639 100644 --- a/include/Nazara/Math/Matrix4.inl +++ b/include/Nazara/Math/Matrix4.inl @@ -369,8 +369,6 @@ bool NzMatrix4::GetInverseAffine(NzMatrix4* dest) const m41 * m12 * m23 + m41 * m13 * m22; - inv[15] = F(0.0); - T invDet = F(1.0) / det; for (unsigned int i = 0; i < 16; ++i) inv[i] *= invDet; @@ -563,7 +561,7 @@ NzMatrix4& NzMatrix4::MakeTranslation(const NzVector3& translation) } template -NzMatrix4& NzMatrix4::MakeTransform(const NzVector3& translation, const NzVector3& scale, const NzQuaternion& rotation) +NzMatrix4& NzMatrix4::MakeTransform(const NzVector3& translation, const NzQuaternion& rotation, const NzVector3& scale) { // La rotation et la translation peuvent être appliquées directement SetRotation(rotation); @@ -922,10 +920,10 @@ NzMatrix4 NzMatrix4::Translate(const NzVector3& translation) } template -NzMatrix4 NzMatrix4::Transform(const NzVector3& translation, const NzVector3& scale, const NzQuaternion& rotation) +NzMatrix4 NzMatrix4::Transform(const NzVector3& translation, const NzQuaternion& rotation, const NzVector3& scale) { NzMatrix4 mat; - mat.MakeTransform(translation, scale, rotation); + mat.MakeTransform(translation, rotation, scale); return mat; } diff --git a/src/Nazara/Utility/Node.cpp b/src/Nazara/Utility/Node.cpp index 1a0674041..399f172c9 100644 --- a/src/Nazara/Utility/Node.cpp +++ b/src/Nazara/Utility/Node.cpp @@ -650,6 +650,6 @@ void NzNode::UpdateTransformMatrix() const if (!m_derivedUpdated) UpdateDerived(); - m_transformMatrix.MakeTransform(m_derivedPosition, m_derivedScale, m_derivedRotation); + m_transformMatrix.MakeTransform(m_derivedPosition, m_derivedRotation, m_derivedScale); m_transformMatrixUpdated = true; }