Matrix class included
Dependencies: Matrix
Diff: MatrixMath.cpp
- Revision:
- 7:b22d56ac37aa
- Parent:
- 6:aa5e94cddb3f
--- a/MatrixMath.cpp Thu Sep 17 17:51:22 2020 +0700 +++ b/MatrixMath.cpp Tue Aug 10 08:08:11 2021 +0000 @@ -24,6 +24,26 @@ return result; } +///Transpose matrix +Matrix MatrixMath::Matrixcross(const float px, const float py, const float pz) +{ + Matrix result(3,3); //Transpose Matrix + result(1,2) = -pz; + result(1,3) = py; + result(2,1) = pz; + result(2,3) = -px; + result(3,1) = -py; + result(3,2) = px; + return result; +} +Matrix MatrixMath::Vector2mat(const Vector3 vec) +{ + Matrix result(3,1); //Transpose Matrix + result(1,1) = vec.x; + result(2,1) = vec.y; + result(3,1) = vec.z; + return result; +} Matrix MatrixMath::Inv(const Matrix &Mat) { if (Mat._nRows == Mat._nCols)