From 2d1120c1718da183a4178bec9d3d999ef7ac827f Mon Sep 17 00:00:00 2001 From: Hans Goudey Date: Mon, 22 Mar 2021 11:52:44 -0400 Subject: BLI: Add "identity" constructor to float4x4 type --- source/blender/blenlib/BLI_float4x4.hh | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'source/blender') 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]; -- cgit v1.2.3