Lines Matching refs:R
31 mat<TYPE, 3, 3> R; in quatToMatrix() local
45 R[0][0] = 1 - sq_q2 - sq_q3; in quatToMatrix()
46 R[0][1] = q1_q2 - q3_q0; in quatToMatrix()
47 R[0][2] = q1_q3 + q2_q0; in quatToMatrix()
48 R[1][0] = q1_q2 + q3_q0; in quatToMatrix()
49 R[1][1] = 1 - sq_q1 - sq_q3; in quatToMatrix()
50 R[1][2] = q2_q3 - q1_q0; in quatToMatrix()
51 R[2][0] = q1_q3 - q2_q0; in quatToMatrix()
52 R[2][1] = q2_q3 + q1_q0; in quatToMatrix()
53 R[2][2] = 1 - sq_q1 - sq_q2; in quatToMatrix()
54 return R; in quatToMatrix()
58 vec<TYPE, 4> matrixToQuat(const mat<TYPE, 3, 3>& R) { in matrixToQuat() argument
68 const float Hx = R[0].x; in matrixToQuat()
69 const float My = R[1].y; in matrixToQuat()
70 const float Az = R[2].z; in matrixToQuat()
75 q.x = copysignf(q.x, R[2].y - R[1].z); in matrixToQuat()
76 q.y = copysignf(q.y, R[0].z - R[2].x); in matrixToQuat()
77 q.z = copysignf(q.z, R[1].x - R[0].y); in matrixToQuat()