summaryrefslogtreecommitdiffstats
path: root/Common/interface
diff options
context:
space:
mode:
authorassiduous <assiduous@diligentgraphics.com>2020-12-14 04:19:22 +0000
committerassiduous <assiduous@diligentgraphics.com>2020-12-14 04:19:22 +0000
commitfa14d39cb458b0c8f955e0c5eb0713112b9bba18 (patch)
tree1c996358ce19e50d880195f09ee918d6bfbdc91e /Common/interface
parentD3D11 Device context: verifying committed resources only when DRAW_FLAG_VERIF... (diff)
downloadDiligentCore-fa14d39cb458b0c8f955e0c5eb0713112b9bba18.tar.gz
DiligentCore-fa14d39cb458b0c8f955e0c5eb0713112b9bba18.zip
Math Lib: added Matrix4x4 constructor from float4 rows
Diffstat (limited to 'Common/interface')
-rw-r--r--Common/interface/BasicMath.hpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/Common/interface/BasicMath.hpp b/Common/interface/BasicMath.hpp
index e58583c6..0856f7a6 100644
--- a/Common/interface/BasicMath.hpp
+++ b/Common/interface/BasicMath.hpp
@@ -1073,6 +1073,19 @@ template <class T> struct Matrix4x4
}
// clang-format on
+ // clang-format off
+ Matrix4x4(const Vector4<T>& Row0,
+ const Vector4<T>& Row1,
+ const Vector4<T>& Row2,
+ const Vector4<T>& Row3) :
+ _11{Row0.x}, _12{Row0.y}, _13{Row0.z}, _14{Row0.w},
+ _21{Row1.x}, _22{Row1.y}, _23{Row1.z}, _24{Row1.w},
+ _31{Row2.x}, _32{Row2.y}, _33{Row2.z}, _34{Row2.w},
+ _41{Row3.x}, _42{Row3.y}, _43{Row3.z}, _44{Row3.w}
+ {
+ }
+ // clang-format on
+
template <typename Y>
static Matrix4x4 MakeMatrix(const Y& vals)
{