equal
deleted
inserted
replaced
286 /*! |
286 /*! |
287 Rotates \a vector with this quaternion to produce a new vector |
287 Rotates \a vector with this quaternion to produce a new vector |
288 in 3D space. The following code: |
288 in 3D space. The following code: |
289 |
289 |
290 \code |
290 \code |
291 QVector3D result = q.rotateVector(vector); |
291 QVector3D result = q.rotatedVector(vector); |
292 \endcode |
292 \endcode |
293 |
293 |
294 is equivalent to the following: |
294 is equivalent to the following: |
295 |
295 |
296 \code |
296 \code |
297 QVector3D result = (q * QQuaternion(0, vector) * q.conjugate()).vector(); |
297 QVector3D result = (q * QQuaternion(0, vector) * q.conjugate()).vector(); |
298 \endcode |
298 \endcode |
299 */ |
299 */ |
300 QVector3D QQuaternion::rotateVector(const QVector3D& vector) const |
300 QVector3D QQuaternion::rotatedVector(const QVector3D& vector) const |
301 { |
301 { |
302 return (*this * QQuaternion(0, vector) * conjugate()).vector(); |
302 return (*this * QQuaternion(0, vector) * conjugate()).vector(); |
303 } |
303 } |
304 |
304 |
305 /*! |
305 /*! |