[Bf-blender-cvs] [672e4c3fa5d] soc-2021-adaptive-cloth: float2x2: constructor through columns of the matrix
ishbosamiya
noreply at git.blender.org
Mon Sep 6 11:47:40 CEST 2021
Commit: 672e4c3fa5d58b45b6c7cc83f88f200b66da51b6
Author: ishbosamiya
Date: Sun Sep 5 10:54:59 2021 +0530
Branches: soc-2021-adaptive-cloth
https://developer.blender.org/rB672e4c3fa5d58b45b6c7cc83f88f200b66da51b6
float2x2: constructor through columns of the matrix
===================================================================
M source/blender/blenlib/BLI_float2x2.hh
===================================================================
diff --git a/source/blender/blenlib/BLI_float2x2.hh b/source/blender/blenlib/BLI_float2x2.hh
index 4d4f9ae522a..81628fee84e 100644
--- a/source/blender/blenlib/BLI_float2x2.hh
+++ b/source/blender/blenlib/BLI_float2x2.hh
@@ -48,6 +48,18 @@ struct float2x2 {
{
}
+ /**
+ * Constructor through columns of the matrix
+ */
+ float2x2(const float2 &col1, const float2 &col2)
+ {
+ this->ptr()[0][0] = col1[0];
+ this->ptr()[0][1] = col1[1];
+
+ this->ptr()[1][0] = col2[0];
+ this->ptr()[1][1] = col2[1];
+ }
+
static float2x2 identity()
{
float2x2 mat;
More information about the Bf-blender-cvs
mailing list