Bug 1082483, part 1 - Rename Matrix4x4::Translate/Scale to Matrix4x4::PreTranslate/PreScale, leaving temporary inlines for the old names. r=Bas

This commit is contained in:
Jonathan Watt 2014-10-16 10:51:12 +01:00
Родитель b841266ac1
Коммит a47a426fe5
1 изменённых файлов: 11 добавлений и 3 удалений

Просмотреть файл

@ -558,7 +558,7 @@ public:
* this method would be preferred since it only involves 12 floating-point
* multiplications.)
*/
Matrix4x4 &Translate(Float aX, Float aY, Float aZ)
Matrix4x4 &PreTranslate(Float aX, Float aY, Float aZ)
{
_41 += aX * _11 + aY * _21 + aZ * _31;
_42 += aX * _12 + aY * _22 + aZ * _32;
@ -567,6 +567,10 @@ public:
return *this;
}
Matrix4x4 &Translate(Float aX, Float aY, Float aZ)
{
return PreTranslate(aX, aY, aZ);
}
/**
* Similar to PreTranslate, but the translation is applied -after- this
@ -609,7 +613,7 @@ public:
/**
* Similar to PreTranslate, but applies a scale instead of a translation.
*/
Matrix4x4 &Scale(Float aX, Float aY, Float aZ)
Matrix4x4 &PreScale(Float aX, Float aY, Float aZ)
{
_11 *= aX;
_12 *= aX;
@ -623,6 +627,10 @@ public:
return *this;
}
Matrix4x4 &Scale(Float aX, Float aY, Float aZ)
{
return PreScale(aX, aY, aZ);
}
/**
* Similar to PostTranslate, but applies a scale instead of a translation.
@ -663,7 +671,7 @@ public:
Matrix4x4 &ChangeBasis(Float aX, Float aY, Float aZ)
{
// Translate to the origin before applying this matrix
Translate(-aX, -aY, -aZ);
PreTranslate(-aX, -aY, -aZ);
// Translate back into position after applying this matrix
PostTranslate(aX, aY, aZ);