From fa14d39cb458b0c8f955e0c5eb0713112b9bba18 Mon Sep 17 00:00:00 2001 From: assiduous Date: Sun, 13 Dec 2020 20:19:22 -0800 Subject: Math Lib: added Matrix4x4 constructor from float4 rows --- Common/interface/BasicMath.hpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'Common/interface') 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 struct Matrix4x4 } // clang-format on + // clang-format off + Matrix4x4(const Vector4& Row0, + const Vector4& Row1, + const Vector4& Row2, + const Vector4& 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 static Matrix4x4 MakeMatrix(const Y& vals) { -- cgit v1.2.3