# Minor optimisations and features.

Made CMatrix3D::Translate assume something sensible about the structure
of the matrix, so it doesn't have to do a matrix multiplication.
Added quaternion nlerp (but haven't used it anywhere).
Changed animation interpolation so it loops smoothly in the actor viewer
but (hopefully) doesn't interpolate dying units into a half-upright
pose.

This was SVN commit r4932.
This commit is contained in:
Ykkrosh
2007-03-01 00:14:35 +00:00
parent f4d1ad77c2
commit fc111ecb08
8 changed files with 75 additions and 37 deletions
+6 -4
View File
@@ -218,14 +218,16 @@ void CMatrix3D::SetTranslation(const CVector3D& vector)
//Applies a translation to the matrix
void CMatrix3D::Translate(float x, float y, float z)
{
CMatrix3D Temp;
Temp.SetTranslation(x,y,z);
Concatenate(Temp);
_14 += x;
_24 += y;
_34 += z;
}
void CMatrix3D::Translate(const CVector3D &vector)
{
Translate(vector.X,vector.Y,vector.Z);
_14 += vector.X;
_24 += vector.Y;
_34 += vector.Z;
}
void CMatrix3D::Concatenate(const CMatrix3D& m)