Line
Link Here
|
0 |
-- /tmp/tmpWcb4Jb-meld/Eigen/src/Geometry/Quaternion.h |
0 |
++ /home/strasdat/src/sim3_for_thesis/EXTERNAL/eigen3.1/Eigen/src/Geometry/Quaternion.h |
Lines 182-187
Link Here
|
182 |
/** return the result vector of \a v through the rotation*/ |
182 |
/** return the result vector of \a v through the rotation*/ |
183 |
EIGEN_STRONG_INLINE Vector3 _transformVector(Vector3 v) const; |
183 |
EIGEN_STRONG_INLINE Vector3 _transformVector(Vector3 v) const; |
184 |
|
184 |
|
|
|
185 |
/** return the result vector of \a v through the rotation and scaling*/ |
186 |
EIGEN_STRONG_INLINE Vector3 _rotateAndScaleVector(Vector3 v) const; |
187 |
|
185 |
/** \returns \c *this with scalar type casted to \a NewScalarType |
188 |
/** \returns \c *this with scalar type casted to \a NewScalarType |
186 |
* |
189 |
* |
187 |
* Note that if \a NewScalarType is equal to the current scalar type of \c *this |
190 |
* Note that if \a NewScalarType is equal to the current scalar type of \c *this |
Lines 498-503
Link Here
|
498 |
Vector3 uv = this->vec().cross(v); |
501 |
Vector3 uv = this->vec().cross(v); |
499 |
uv += uv; |
502 |
uv += uv; |
500 |
return v + this->w() * uv + this->vec().cross(uv); |
503 |
return v + this->w() * uv + this->vec().cross(uv); |
|
|
504 |
} |
505 |
|
506 |
/** Rotation and scaling of a vector by a quaternion. |
507 |
*/ |
508 |
template <class Derived> |
509 |
EIGEN_STRONG_INLINE typename QuaternionBase<Derived>::Vector3 |
510 |
QuaternionBase<Derived>::_rotateAndScaleVector(Vector3 v) const |
511 |
{ |
512 |
Scalar scale = this->norm(); |
513 |
if (scale==0) |
514 |
return Vector3::Zero(); |
515 |
|
516 |
Vector3 imag_cross_v = this->vec().cross(v); |
517 |
imag_cross_v += imag_cross_v; |
518 |
return scale*v + (this->w() * imag_cross_v |
519 |
+ this->vec().cross(imag_cross_v))/scale; |
501 |
} |
520 |
} |
502 |
|
521 |
|
503 |
template<class Derived> |
522 |
template<class Derived> |