--- a/gfx/2d/Matrix.h
+++ b/gfx/2d/Matrix.h
@@ -553,25 +553,29 @@ public:
* Matrix4x4::Translation(x, y) * this
*
* (Note that in performance critical code multiplying by the result of a
* Translation()/Scaling() call is not recommended since that results in a
* full matrix multiply involving 64 floating-point multiplications. Calling
* 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;
_43 += aX * _13 + aY * _23 + aZ * _33;
_44 += aX * _14 + aY * _24 + aZ * _34;
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
* matrix's existing transformation instead of before it.
*
* This method is generally less used than PreTranslate since typically code
* wants to adjust an existing user space to device space matrix to create a
* transform to device space from a -new- user space (translated from the
@@ -604,30 +608,34 @@ public:
0.0f, aScaleY, 0.0f, 0.0f,
0.0f, 0.0f, aScaleZ, 0.0f,
0.0f, 0.0f, 0.0f, 1.0f);
}
/**
* 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;
_13 *= aX;
_21 *= aY;
_22 *= aY;
_23 *= aY;
_31 *= aZ;
_32 *= aZ;
_33 *= aZ;
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.
*/
Matrix4x4 &PostScale(Float aScaleX, Float aScaleY, Float aScaleZ)
{
_11 *= aScaleX;
_21 *= aScaleX;
@@ -658,17 +666,17 @@ public:
void SkewYZ(Float aSkew)
{
(*this)[2] += (*this)[1] * aSkew;
}
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);
return *this;
}
bool operator==(const Matrix4x4& o) const