.. SPDX-License-Identifier: BSD-3-Clause Copyright Contributors to the OpenEXR Project. .. _matrix-functions: Matrix Functions ################ .. code-block:: #include Functions that operate on matrices .. doxygenfunction:: extractScaling(const Matrix44& mat, Vec3& scl, bool exc) .. doxygenfunction:: sansScaling(const Matrix44& mat, bool exc) .. doxygenfunction:: removeScaling(Matrix44& mat, bool exc) .. doxygenfunction:: extractScalingAndShear(const Matrix44& mat, Vec3& scl, Vec3& shr, bool exc) .. doxygenfunction:: sansScalingAndShear(const Matrix44& mat, bool exc) .. doxygenfunction:: sansScalingAndShear(Matrix44& result, const Matrix44& mat, bool exc) .. doxygenfunction:: removeScalingAndShear(Matrix44& mat, bool exc) .. doxygenfunction:: extractAndRemoveScalingAndShear(Matrix44& mat, Vec3& scl, Vec3& shr, bool exc) .. doxygenfunction:: extractEulerXYZ(const Matrix44& mat, Vec3& rot) .. doxygenfunction:: extractEulerZYX(const Matrix44& mat, Vec3& rot) .. doxygenfunction:: extractQuat(const Matrix44& mat) .. doxygenfunction:: extractSHRT(const Matrix44& mat, Vec3& s, Vec3& h, Vec3& r, Vec3& t, bool exc, typename Euler::Order rOrder) .. doxygenfunction:: extractSHRT(const Matrix44& mat, Vec3& s, Vec3& h, Vec3& r, Vec3& t, bool exc) .. doxygenfunction:: extractSHRT(const Matrix44& mat, Vec3& s, Vec3& h, Euler& r, Vec3& t, bool exc) .. doxygenfunction:: checkForZeroScaleInRow(const T& scl, const Vec3& row, bool exc) .. doxygenfunction:: outerProduct(const Vec4& a, const Vec4& b) .. doxygenfunction:: rotationMatrix(const Vec3& fromDirection, const Vec3& toDirection) .. doxygenfunction:: rotationMatrixWithUpDir(const Vec3& fromDir, const Vec3& toDir, const Vec3& upDir) .. doxygenfunction:: alignZAxisWithTargetDir(Matrix44& result, Vec3 targetDir, Vec3 upDir) .. doxygenfunction:: computeLocalFrame(const Vec3& p, const Vec3& xDir, const Vec3& normal) .. doxygenfunction:: addOffset(const Matrix44& inMat, const Vec3& tOffset, const Vec3& rOffset, const Vec3& sOffset, const Vec3& ref) .. doxygenfunction:: computeRSMatrix(bool keepRotateA, bool keepScaleA, const Matrix44& A, const Matrix44& B) .. doxygenfunction:: extractScaling(const Matrix33& mat, Vec2& scl, bool exc) .. doxygenfunction:: sansScaling(const Matrix33& mat, bool exc) .. doxygenfunction:: removeScaling(Matrix33& mat, bool exc) .. doxygenfunction:: extractScalingAndShear(const Matrix33& mat, Vec2& scl, T& shr, bool exc) .. doxygenfunction:: sansScalingAndShear(const Matrix33& mat, bool exc) .. doxygenfunction:: removeScalingAndShear(Matrix33& mat, bool exc) .. doxygenfunction:: extractAndRemoveScalingAndShear(Matrix33& mat, Vec2& scl, T& shr, bool exc) .. doxygenfunction:: extractEuler(const Matrix22& mat, T& rot) .. doxygenfunction:: extractEuler(const Matrix33& mat, T& rot) .. doxygenfunction:: extractSHRT(const Matrix33& mat, Vec2& s, T& h, T& r, Vec2& t, bool exc) .. doxygenfunction:: checkForZeroScaleInRow(const T& scl, const Vec2& row, bool exc) .. doxygenfunction:: outerProduct(const Vec3& a, const Vec3& b) .. doxygenfunction:: procrustesRotationAndTranslation(const Vec3* A, const Vec3* B, const T* weights, const size_t numPoints, const bool doScaling) .. doxygenfunction:: procrustesRotationAndTranslation(const Vec3* A, const Vec3* B, const size_t numPoints, const bool doScaling) .. doxygenfunction:: jacobiSVD(const Matrix33& A, Matrix33& U, Vec3& S, Matrix33& V, const T tol, const bool forcePositiveDeterminant) .. doxygenfunction:: jacobiSVD(const Matrix44& A, Matrix44& U, Vec4& S, Matrix44& V, const T tol, const bool forcePositiveDeterminant) .. doxygenfunction:: jacobiEigenSolver(Matrix33& A, Vec3& S, Matrix33& V, const T tol) .. doxygenfunction:: jacobiEigenSolver(Matrix33& A, Vec3& S, Matrix33& V) .. doxygenfunction:: jacobiEigenSolver(Matrix44& A, Vec4& S, Matrix44& V, const T tol) .. doxygenfunction:: jacobiEigenSolver(Matrix44& A, Vec4& S, Matrix44& V) .. doxygenfunction:: maxEigenVector(TM& A, TV& S) .. doxygenfunction:: minEigenVector(TM& A, TV& S)