Changed Matrix4::(Make)Transform argument pos
To reflect "TRS" transformation Also removed an useless line Former-commit-id: b60a70d04797f40f3490b26706740b375fe38421
This commit is contained in:
parent
6699ce328f
commit
961c658ae1
|
|
@ -61,7 +61,7 @@ class NzMatrix4
|
|||
NzMatrix4& MakeRotation(const NzQuaternion<T>& rotation);
|
||||
NzMatrix4& MakeScale(const NzVector3<T>& scale);
|
||||
NzMatrix4& MakeTranslation(const NzVector3<T>& translation);
|
||||
NzMatrix4& MakeTransform(const NzVector3<T>& translation, const NzVector3<T>& scale, const NzQuaternion<T>& rotation);
|
||||
NzMatrix4& MakeTransform(const NzVector3<T>& translation, const NzQuaternion<T>& rotation, const NzVector3<T>& scale);
|
||||
NzMatrix4& MakeZero();
|
||||
|
||||
NzMatrix4& Set(T r11, T r12, T r13, T r14,
|
||||
|
|
@ -112,7 +112,7 @@ class NzMatrix4
|
|||
static NzMatrix4 Rotate(const NzQuaternion<T>& rotation);
|
||||
static NzMatrix4 Scale(const NzVector3<T>& scale);
|
||||
static NzMatrix4 Translate(const NzVector3<T>& translation);
|
||||
static NzMatrix4 Transform(const NzVector3<T>& translation, const NzVector3<T>& scale, const NzQuaternion<T>& rotation);
|
||||
static NzMatrix4 Transform(const NzVector3<T>& translation, const NzQuaternion<T>& rotation, const NzVector3<T>& scale);
|
||||
static NzMatrix4 Zero();
|
||||
|
||||
T m11, m12, m13, m14,
|
||||
|
|
|
|||
|
|
@ -369,8 +369,6 @@ bool NzMatrix4<T>::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<T>& NzMatrix4<T>::MakeTranslation(const NzVector3<T>& translation)
|
|||
}
|
||||
|
||||
template<typename T>
|
||||
NzMatrix4<T>& NzMatrix4<T>::MakeTransform(const NzVector3<T>& translation, const NzVector3<T>& scale, const NzQuaternion<T>& rotation)
|
||||
NzMatrix4<T>& NzMatrix4<T>::MakeTransform(const NzVector3<T>& translation, const NzQuaternion<T>& rotation, const NzVector3<T>& scale)
|
||||
{
|
||||
// La rotation et la translation peuvent être appliquées directement
|
||||
SetRotation(rotation);
|
||||
|
|
@ -922,10 +920,10 @@ NzMatrix4<T> NzMatrix4<T>::Translate(const NzVector3<T>& translation)
|
|||
}
|
||||
|
||||
template<typename T>
|
||||
NzMatrix4<T> NzMatrix4<T>::Transform(const NzVector3<T>& translation, const NzVector3<T>& scale, const NzQuaternion<T>& rotation)
|
||||
NzMatrix4<T> NzMatrix4<T>::Transform(const NzVector3<T>& translation, const NzQuaternion<T>& rotation, const NzVector3<T>& scale)
|
||||
{
|
||||
NzMatrix4 mat;
|
||||
mat.MakeTransform(translation, scale, rotation);
|
||||
mat.MakeTransform(translation, rotation, scale);
|
||||
|
||||
return mat;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue