From b07a4bb5be991df77d601c78924f15b5ee8c95cf Mon Sep 17 00:00:00 2001 From: hyzboy Date: Wed, 17 Jul 2024 01:37:14 +0800 Subject: [PATCH] Added TransformMatrix functions in Matrix.h --- inc/hgl/math/Matrix.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/inc/hgl/math/Matrix.h b/inc/hgl/math/Matrix.h index 7bb052c..ed28ad8 100644 --- a/inc/hgl/math/Matrix.h +++ b/inc/hgl/math/Matrix.h @@ -167,5 +167,20 @@ namespace hgl { return normalize(m*v); } + + inline Matrix3f TransformMatrix(const Matrix3f &root,const Matrix3f &child) + { + return root*child; + } + + inline Matrix3f TransformMatrix(const Matrix4f &root,const Matrix3f &child) + { + return Matrix3f(root*Matrix4f(child)); + } + + inline Matrix4f TransformMatrix(const Matrix4f &root,const Matrix4f &child) + { + return root*child; + } }//namespace hgl #endif//HGL_ALGORITHM_MATH_VECTOR_MATRIX_INCLUDE