Lines Matching refs:q2

71   Quaternionx q1, q2;  in quaternion()  local
72 q2.setIdentity(); in quaternion()
73 VERIFY_IS_APPROX(Quaternionx(Quaternionx::Identity()).coeffs(), q2.coeffs()); in quaternion()
75 VERIFY_IS_APPROX(q1.coeffs(), (q1*q2).coeffs()); in quaternion()
78 q1 *= q2; in quaternion()
81 q2 = AngleAxisx(a, v1.normalized()); in quaternion()
84 Scalar refangle = abs(AngleAxisx(q1.inverse()*q2).angle()); in quaternion()
88 if((q1.coeffs()-q2.coeffs()).norm() > 10*largeEps) in quaternion()
90 VERIFY_IS_MUCH_SMALLER_THAN(abs(q1.angularDistance(q2) - refangle), Scalar(1)); in quaternion()
95 VERIFY_IS_APPROX(q1 * q2 * v2, in quaternion()
96 q1.toRotationMatrix() * q2.toRotationMatrix() * v2); in quaternion()
98 VERIFY( (q2*q1).isApprox(q1*q2, largeEps) in quaternion()
99 || !(q2 * q1 * v2).isApprox(q1.toRotationMatrix() * q2.toRotationMatrix() * v2)); in quaternion()
101 q2 = q1.toRotationMatrix(); in quaternion()
102 VERIFY_IS_APPROX(q1*v1,q2*v1); in quaternion()
119 VERIFY_IS_APPROX( v2.normalized(),(q2.setFromTwoVectors(v1, v2)*v1).normalized()); in quaternion()
120 VERIFY_IS_APPROX( v1.normalized(),(q2.setFromTwoVectors(v1, v1)*v1).normalized()); in quaternion()
121 VERIFY_IS_APPROX(-v1.normalized(),(q2.setFromTwoVectors(v1,-v1)*v1).normalized()); in quaternion()
125 VERIFY_IS_APPROX( v3.normalized(),(q2.setFromTwoVectors(v1, v3)*v1).normalized()); in quaternion()
126 VERIFY_IS_APPROX(-v3.normalized(),(q2.setFromTwoVectors(v1,-v3)*v1).normalized()); in quaternion()
155 q2 = AngleAxisx(b, v1.normalized()); in quaternion()
156 check_slerp(q1,q2); in quaternion()
159 q2 = AngleAxisx(b+Scalar(M_PI), v1.normalized()); in quaternion()
160 check_slerp(q1,q2); in quaternion()
163 q2 = AngleAxisx(-b, -v1.normalized()); in quaternion()
164 check_slerp(q1,q2); in quaternion()
167 q2.coeffs() = -q1.coeffs(); in quaternion()
168 check_slerp(q1,q2); in quaternion()
201 Quaternionx q2 = mq2; in mapQuaternion() local
205 VERIFY_IS_APPROX(q1.coeffs(), q2.coeffs()); in mapQuaternion()
225 VERIFY_IS_APPROX(mq1*mq2, q1*q2); in mapQuaternion()
226 VERIFY_IS_APPROX(mq3*mq2, q3*q2); in mapQuaternion()
227 VERIFY_IS_APPROX(mcq1*mq2, q1*q2); in mapQuaternion()
228 VERIFY_IS_APPROX(mcq3*mq2, q3*q2); in mapQuaternion()
241 QuaternionUA *q2 = ::new(reinterpret_cast<void*>(array2)) QuaternionUA; in quaternionAlignment() local
245 *q2 = *q1; in quaternionAlignment()
248 VERIFY_IS_APPROX(q1->coeffs(), q2->coeffs()); in quaternionAlignment()