Proper CTransform::multiplyIgnoreTranslation return value

This commit is contained in:
Jack Andersen 2016-03-30 20:18:05 -10:00
parent f9f432be97
commit 1f7088e5eb
1 changed files with 6 additions and 1 deletions

View File

@ -171,7 +171,12 @@ public:
TVectorUnion{0.f, 0.f, factor, 0.f}));
}
inline void multiplyIgnoreTranslation(const CTransform& xfrm) { m_basis = m_basis*xfrm.m_basis; }
inline CTransform multiplyIgnoreTranslation(const CTransform& xfrm)
{
CTransform ret;
ret.m_basis = m_basis * xfrm.m_basis;
return ret;
}
inline CTransform getRotation() { CTransform ret = *this; ret.m_origin.zeroOut(); return ret; }
void setRotation(const CMatrix3f& mat) { m_basis = mat; }