diff --git a/include/Nazara/Math/Matrix4.hpp b/include/Nazara/Math/Matrix4.hpp index 6d08cbbb1..2def3428d 100644 --- a/include/Nazara/Math/Matrix4.hpp +++ b/include/Nazara/Math/Matrix4.hpp @@ -110,6 +110,8 @@ class NzMatrix4 bool operator==(const NzMatrix4& mat) const; bool operator!=(const NzMatrix4& mat) const; + static NzMatrix4 Concatenate(const NzMatrix4& left, const NzMatrix4& right); + static NzMatrix4 ConcatenateAffine(const NzMatrix4& left, const NzMatrix4& right); static NzMatrix4 Identity(); static NzMatrix4 LookAt(const NzVector3& eye, const NzVector3& target, const NzVector3& up = NzVector3::Up()); static NzMatrix4 Ortho(T left, T right, T top, T bottom, T zNear = -1.0, T zFar = 1.0); diff --git a/include/Nazara/Math/Matrix4.inl b/include/Nazara/Math/Matrix4.inl index 2531b51dd..989302bd1 100644 --- a/include/Nazara/Math/Matrix4.inl +++ b/include/Nazara/Math/Matrix4.inl @@ -942,6 +942,24 @@ bool NzMatrix4::operator!=(const NzMatrix4& mat) const return !operator==(mat); } +template +NzMatrix4 NzMatrix4::Concatenate(const NzMatrix4& left, const NzMatrix4& right) +{ + NzMatrix4 matrix(left); // Copie de la matrice de gauche + matrix.Concatenate(right); // Concaténation avec la matrice de droite + + return matrix; // Et on renvoie la matrice +} + +template +NzMatrix4 NzMatrix4::ConcatenateAffine(const NzMatrix4& left, const NzMatrix4& right) +{ + NzMatrix4 matrix(left); // Copie de la matrice de gauche + matrix.ConcatenateAffine(right); // Concaténation (affine) avec la matrice de droite + + return matrix; // Et on renvoie la matrice +} + template NzMatrix4 NzMatrix4::Identity() {