Added Matrix4::Apply[Rotation|Translation]
Former-commit-id: 1c59aa48f057d4bdc4b4413e349d2b4290dec055
This commit is contained in:
@@ -43,6 +43,12 @@ NzMatrix4<T>::NzMatrix4(const NzMatrix4<U>& matrix)
|
||||
Set(matrix);
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
NzMatrix4<T>& NzMatrix4<T>::ApplyRotation(const NzQuaternion<T>& rotation)
|
||||
{
|
||||
return Concatenate(NzMatrix4f::Rotate(rotation));
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
NzMatrix4<T>& NzMatrix4<T>::ApplyScale(const NzVector3<T>& scale)
|
||||
{
|
||||
@@ -62,6 +68,17 @@ NzMatrix4<T>& NzMatrix4<T>::ApplyScale(const NzVector3<T>& scale)
|
||||
return *this;
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
NzMatrix4<T>& NzMatrix4<T>::ApplyTranslation(const NzVector3<T>& translation)
|
||||
{
|
||||
m41 += translation.x;
|
||||
m42 += translation.y;
|
||||
m43 += translation.z;
|
||||
m_isIdentity = false;
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
NzMatrix4<T>& NzMatrix4<T>::Concatenate(const NzMatrix4& matrix)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user