Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErik Abrahamsson <erik85>2021-10-13 00:59:06 +0300
committerHans Goudey <h.goudey@me.com>2021-10-13 00:59:06 +0300
commit351721d0eaa5e9bb216ac3ef232eec68d3491710 (patch)
treebfcadaf4fdcada813c01b21d1a3be72f47b00e6b /source/blender/blenlib/BLI_float4x4.hh
parentf18ab3470f3da32d561781e0794e5983221d5a2d (diff)
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
Diffstat (limited to 'source/blender/blenlib/BLI_float4x4.hh')
-rw-r--r--source/blender/blenlib/BLI_float4x4.hh5
1 files changed, 5 insertions, 0 deletions
diff --git a/source/blender/blenlib/BLI_float4x4.hh b/source/blender/blenlib/BLI_float4x4.hh
index 14e61d53845..b7f839f4ddf 100644
--- a/source/blender/blenlib/BLI_float4x4.hh
+++ b/source/blender/blenlib/BLI_float4x4.hh
@@ -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.