add CMatrix3f::addScaledMatrix

This commit is contained in:
Jack Andersen 2016-04-12 12:27:38 -10:00
parent 286d098ecb
commit f17f2371bf
1 changed files with 8 additions and 0 deletions

View File

@ -140,6 +140,14 @@ public:
inline void invert() {*this = inverted();}
CMatrix3f inverted() const;
void addScaledMatrix(const CMatrix3f& other, float scale)
{
CVector3f scaleVec(scale);
vec[0] += other.vec[0] * scaleVec;
vec[1] += other.vec[1] * scaleVec;
vec[2] += other.vec[2] * scaleVec;
}
union
{
float m[3][4]; /* 4th row for union-alignment */