зеркало из https://github.com/mozilla/gecko-dev.git
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:
Родитель
b841266ac1
Коммит
a47a426fe5
|
@ -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);
|
||||
|
|
Загрузка…
Ссылка в новой задаче