diff options
author | Hans Goudey <h.goudey@me.com> | 2021-03-22 18:52:44 +0300 |
---|---|---|
committer | Hans Goudey <h.goudey@me.com> | 2021-03-22 18:52:44 +0300 |
commit | 2d1120c1718da183a4178bec9d3d999ef7ac827f (patch) | |
tree | f2632f96298d3fbc1ec72c47e6c273a60e370c89 /source/blender | |
parent | 9baf39c8daded5b000d4eacc6c677dbfd3359478 (diff) |
BLI: Add "identity" constructor to float4x4 type
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/blenlib/BLI_float4x4.hh | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/source/blender/blenlib/BLI_float4x4.hh b/source/blender/blenlib/BLI_float4x4.hh index a3eec075027..f5ba91bc12c 100644 --- a/source/blender/blenlib/BLI_float4x4.hh +++ b/source/blender/blenlib/BLI_float4x4.hh @@ -45,6 +45,13 @@ struct float4x4 { return mat; } + static float4x4 identity() + { + float4x4 mat; + unit_m4(mat.values); + return mat; + } + operator float *() { return &values[0][0]; |