BLI: Overload float4x4 multiplication-assignment operator

This looks a lot nicer than writing `mul_m4_m4_post` instead.

Differential Revision: https://developer.blender.org/D12844
This commit is contained in:
Erik Abrahamsson 2021-10-12 16:59:06 -05:00 committed by Hans Goudey
parent f18ab3470f
commit 351721d0ea
1 changed files with 5 additions and 0 deletions

View File

@ -124,6 +124,11 @@ struct float4x4 {
return result;
}
void operator*=(const float4x4 &other)
{
mul_m4_m4_post(values, other.values);
}
/**
* This also applies the translation on the vector. Use `m.ref_3x3() * v` if that is not
* intended.