12 const auto [q, r] = m.qr();
16 for (
int i = 0; i < 3; ++i )
18 scaling[i][i] = std::abs( r[i][i] );
31 auto eps = T( 10 ) * std::numeric_limits<T>::epsilon();
32 if ( std::abs( scale.
x.x - T( 1 ) ) > eps )
34 if ( std::abs( scale.
y.y - T( 1 ) ) > eps )
36 if ( std::abs( scale.
z.z - T( 1 ) ) > eps )
Definition MRCameraOrientationPlugin.h:8
void decomposeMatrix3(const Matrix3< T > &m, Matrix3< T > &rotation, Matrix3< T > &scaling)
Decomposes matrix into rotation and scaling matrices.
Definition MRMatrix3Decompose.h:10
bool isRigid(const Matrix3< T > &m)
Returns true if matrix scale is identity.
Definition MRMatrix3Decompose.h:27
Definition MRMesh/MRMatrix3.h:13
Vector3< T > x
rows, identity matrix by default
Definition MRMesh/MRMatrix3.h:18
Vector3< T > y
Definition MRMesh/MRMatrix3.h:19
Vector3< T > z
Definition MRMesh/MRMatrix3.h:20