Added Matrix4::Concatenate static method
Former-commit-id: 842e86a89fb7468552d6a9473a228bfb7a8a3809
This commit is contained in:
parent
d84c2e040c
commit
b51845d88f
|
|
@ -110,6 +110,8 @@ class NzMatrix4
|
||||||
bool operator==(const NzMatrix4& mat) const;
|
bool operator==(const NzMatrix4& mat) const;
|
||||||
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 Identity();
|
||||||
static NzMatrix4 LookAt(const NzVector3<T>& eye, const NzVector3<T>& target, const NzVector3<T>& up = NzVector3<T>::Up());
|
static NzMatrix4 LookAt(const NzVector3<T>& eye, const NzVector3<T>& target, const NzVector3<T>& up = NzVector3<T>::Up());
|
||||||
static NzMatrix4 Ortho(T left, T right, T top, T bottom, T zNear = -1.0, T zFar = 1.0);
|
static NzMatrix4 Ortho(T left, T right, T top, T bottom, T zNear = -1.0, T zFar = 1.0);
|
||||||
|
|
|
||||||
|
|
@ -942,6 +942,24 @@ bool NzMatrix4<T>::operator!=(const NzMatrix4& mat) const
|
||||||
return !operator==(mat);
|
return !operator==(mat);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
template<typename T>
|
||||||
|
NzMatrix4<T> NzMatrix4<T>::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<typename T>
|
||||||
|
NzMatrix4<T> NzMatrix4<T>::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<typename T>
|
template<typename T>
|
||||||
NzMatrix4<T> NzMatrix4<T>::Identity()
|
NzMatrix4<T> NzMatrix4<T>::Identity()
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue