Lines Matching refs:mat
301 TQuaternion<typename MATRIX::value_type> extractQuat(const MATRIX& mat) { in extractQuat() argument
307 const T trace = mat[0][0] + mat[1][1] + mat[2][2]; in extractQuat()
315 quat.x = (mat[1][2] - mat[2][1]) * s; in extractQuat()
316 quat.y = (mat[2][0] - mat[0][2]) * s; in extractQuat()
317 quat.z = (mat[0][1] - mat[1][0]) * s; in extractQuat()
323 if (mat[1][1] > mat[0][0]) { i = 1; } in extractQuat()
324 if (mat[2][2] > mat[i][i]) { i = 2; } in extractQuat()
330 T s = std::sqrt((mat[i][i] - (mat[j][j] + mat[k][k])) + 1); in extractQuat()
335 quat.w = (mat[j][k] - mat[k][j]) * s; in extractQuat()
336 quat[j] = (mat[i][j] + mat[j][i]) * s; in extractQuat()
337 quat[k] = (mat[i][k] + mat[k][i]) * s; in extractQuat()