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
path: root/source
diff options
context:
space:
mode:
authorHans Goudey <h.goudey@me.com>2021-03-22 18:52:44 +0300
committerHans Goudey <h.goudey@me.com>2021-03-22 18:52:44 +0300
commit2d1120c1718da183a4178bec9d3d999ef7ac827f (patch)
treef2632f96298d3fbc1ec72c47e6c273a60e370c89 /source
parent9baf39c8daded5b000d4eacc6c677dbfd3359478 (diff)
BLI: Add "identity" constructor to float4x4 type
Diffstat (limited to 'source')
-rw-r--r--source/blender/blenlib/BLI_float4x4.hh7
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];