diff options
author | ishbosamiya <ishbosamiya@gmail.com> | 2021-09-05 08:26:14 +0300 |
---|---|---|
committer | ishbosamiya <ishbosamiya@gmail.com> | 2021-09-05 08:26:14 +0300 |
commit | c5433fdcb2a118df59cb9a5a48651a8fb61a0fd2 (patch) | |
tree | 2029914750d1108d49a8153c7d0eb9c90b3b8d92 | |
parent | 4b8dc739960633fbeae8b0bd881c80c4dcd36e76 (diff) |
float3x2: constructor through columns of the matrix
-rw-r--r-- | source/blender/blenlib/BLI_float3x2.hh | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/source/blender/blenlib/BLI_float3x2.hh b/source/blender/blenlib/BLI_float3x2.hh index 4f672e1e96a..1b4731f701c 100644 --- a/source/blender/blenlib/BLI_float3x2.hh +++ b/source/blender/blenlib/BLI_float3x2.hh @@ -47,6 +47,17 @@ struct float3x2 { { } + float3x2(const float3 &col1, const float3 &col2) + { + this->ptr()[0][0] = col1[0]; + this->ptr()[0][1] = col1[1]; + this->ptr()[0][2] = col1[2]; + + this->ptr()[1][0] = col2[0]; + this->ptr()[1][1] = col2[1]; + this->ptr()[1][2] = col2[2]; + } + operator float *() { return &values[0][0]; |