Lines Matching defs:v1

63           v1 = Vector3::Random(),
81 q2 = AngleAxisx(a, v1.normalized());
102 VERIFY_IS_APPROX(q1*v1,q2*v1);
107 VERIFY_IS_APPROX(q1 * v1, Quaternionx(aa) * v1);
110 // the rotation axis and v1 are almost parallel.
112 && (aa.axis() - v1.normalized()).norm() < 1.99
113 && (aa.axis() + v1.normalized()).norm() < 1.99)
115 VERIFY_IS_NOT_APPROX(q1 * v1, Quaternionx(AngleAxisx(aa.angle()*2,aa.axis())) * v1);
119 VERIFY_IS_APPROX( v2.normalized(),(q2.setFromTwoVectors(v1, v2)*v1).normalized());
120 VERIFY_IS_APPROX( v1.normalized(),(q2.setFromTwoVectors(v1, v1)*v1).normalized());
121 VERIFY_IS_APPROX(-v1.normalized(),(q2.setFromTwoVectors(v1,-v1)*v1).normalized());
124 v3 = (v1.array()+eps).matrix();
125 VERIFY_IS_APPROX( v3.normalized(),(q2.setFromTwoVectors(v1, v3)*v1).normalized());
126 VERIFY_IS_APPROX(-v3.normalized(),(q2.setFromTwoVectors(v1,-v3)*v1).normalized());
130 VERIFY_IS_APPROX( v2.normalized(),(Quaternionx::FromTwoVectors(v1, v2)*v1).normalized());
131 VERIFY_IS_APPROX( v1.normalized(),(Quaternionx::FromTwoVectors(v1, v1)*v1).normalized());
132 VERIFY_IS_APPROX(-v1.normalized(),(Quaternionx::FromTwoVectors(v1,-v1)*v1).normalized());
135 v3 = (v1.array()+eps).matrix();
136 VERIFY_IS_APPROX( v3.normalized(),(Quaternionx::FromTwoVectors(v1, v3)*v1).normalized());
137 VERIFY_IS_APPROX(-v3.normalized(),(Quaternionx::FromTwoVectors(v1,-v3)*v1).normalized());
141 VERIFY_IS_APPROX(q1 * (q1.inverse() * v1), v1);
142 VERIFY_IS_APPROX(q1 * (q1.conjugate() * v1), v1);
155 q2 = AngleAxisx(b, v1.normalized());
158 q1 = AngleAxisx(b, v1.normalized());
159 q2 = AngleAxisx(b+Scalar(M_PI), v1.normalized());
162 q1 = AngleAxisx(b, v1.normalized());
163 q2 = AngleAxisx(-b, -v1.normalized());
181 v1 = Vector3::Random();
213 VERIFY_IS_APPROX(mq1 * (mq1.inverse() * v1), v1);
214 VERIFY_IS_APPROX(mq1 * (mq1.conjugate() * v1), v1);
216 VERIFY_IS_APPROX(mcq1 * (mcq1.inverse() * v1), v1);
217 VERIFY_IS_APPROX(mcq1 * (mcq1.conjugate() * v1), v1);
219 VERIFY_IS_APPROX(mq3 * (mq3.inverse() * v1), v1);
220 VERIFY_IS_APPROX(mq3 * (mq3.conjugate() * v1), v1);
222 VERIFY_IS_APPROX(mcq3 * (mcq3.inverse() * v1), v1);
223 VERIFY_IS_APPROX(mcq3 * (mcq3.conjugate() * v1), v1);