mirror of
https://gitea.wildfiregames.com/0ad/0ad.git
synced 2026-10-14 07:17:44 +00:00
# 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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user