[Bf-blender-cvs] [351721d0eaa] master: BLI: Overload float4x4 multiplication-assignment operator

Erik Abrahamsson noreply at git.blender.org
Wed Oct 13 00:00:45 CEST 2021


Commit: 351721d0eaa5e9bb216ac3ef232eec68d3491710
Author: Erik Abrahamsson
Date:   Tue Oct 12 16:59:06 2021 -0500
Branches: master
https://developer.blender.org/rB351721d0eaa5e9bb216ac3ef232eec68d3491710

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

===================================================================

M	source/blender/blenlib/BLI_float4x4.hh

===================================================================

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.



More information about the Bf-blender-cvs mailing list