Bug 1035598 - Add a ChangeBasis() method to Matrix4x4. r=mattwoodrow

This commit is contained in:
Botond Ballo 2014-07-22 18:10:25 -04:00
parent 76d325bbe8
commit fa75a0d598

View File

@ -461,6 +461,17 @@ public:
return *this;
}
Matrix4x4 &ChangeBasis(Float aX, Float aY, Float aZ)
{
// Translate to the origin before applying this matrix
Translate(-aX, -aY, -aZ);
// Translate back into position after applying this matrix
PostTranslate(aX, aY, aZ);
return *this;
}
bool operator==(const Matrix4x4& o) const
{
// XXX would be nice to memcmp here, but that breaks IEEE 754 semantics