|
| enum | { Flags = Eigen::internal::traits<Derived>::Flags
} |
| |
|
typedef internal::traits< Derived >::Scalar | Scalar |
| |
|
typedef NumTraits< Scalar >::Real | RealScalar |
| |
|
typedef internal::traits< Derived >::Coefficients | Coefficients |
| |
| typedef Matrix< Scalar, 3, 1 > | Vector3 |
| |
| typedef Matrix< Scalar, 3, 3 > | Matrix3 |
| |
| typedef AngleAxis< Scalar > | AngleAxisType |
| |
| enum | |
| |
| enum | |
| |
| typedef ei_traits< Derived >::Scalar | Scalar |
| |
| typedef internal::traits< Derived >::Scalar | Scalar |
| |
| typedef Matrix< Scalar, Dim, Dim > | RotationMatrixType |
| |
| typedef Matrix< Scalar, Dim, Dim > | RotationMatrixType |
| |
|
typedef Matrix< Scalar, Dim, 1 > | VectorType |
| |
|
| Scalar | x () const |
| |
| Scalar | y () const |
| |
| Scalar | z () const |
| |
| Scalar | w () const |
| |
| Scalar & | x () |
| |
| Scalar & | y () |
| |
| Scalar & | z () |
| |
| Scalar & | w () |
| |
| const VectorBlock< const Coefficients, 3 > | vec () const |
| |
| VectorBlock< Coefficients, 3 > | vec () |
| |
| const internal::traits< Derived >::Coefficients & | coeffs () const |
| |
| internal::traits< Derived >::Coefficients & | coeffs () |
| |
|
EIGEN_STRONG_INLINE QuaternionBase< Derived > & | operator= (const QuaternionBase< Derived > &other) |
| |
|
template<class OtherDerived > |
| EIGEN_STRONG_INLINE Derived & | operator= (const QuaternionBase< OtherDerived > &other) |
| |
| Derived & | operator= (const AngleAxisType &aa) |
| |
|
template<class OtherDerived > |
| Derived & | operator= (const MatrixBase< OtherDerived > &m) |
| |
| QuaternionBase & | setIdentity () |
| |
| Scalar | squaredNorm () const |
| |
| Scalar | norm () const |
| |
| void | normalize () |
| |
| Quaternion< Scalar > | normalized () const |
| |
| template<class OtherDerived > |
| Scalar | dot (const QuaternionBase< OtherDerived > &other) const |
| |
|
template<class OtherDerived > |
| Scalar | angularDistance (const QuaternionBase< OtherDerived > &other) const |
| |
| Matrix3 | toRotationMatrix () const |
| |
| template<typename Derived1 , typename Derived2 > |
| Derived & | setFromTwoVectors (const MatrixBase< Derived1 > &a, const MatrixBase< Derived2 > &b) |
| |
|
template<class OtherDerived > |
| EIGEN_STRONG_INLINE Quaternion< Scalar > | operator* (const QuaternionBase< OtherDerived > &q) const |
| |
| template<class OtherDerived > |
| EIGEN_STRONG_INLINE Derived & | operator*= (const QuaternionBase< OtherDerived > &q) |
| |
| Quaternion< Scalar > | inverse () const |
| |
| Quaternion< Scalar > | conjugate () const |
| |
| template<class OtherDerived > |
| Quaternion< Scalar > | slerp (const Scalar &t, const QuaternionBase< OtherDerived > &other) const |
| |
| template<class OtherDerived > |
| bool | isApprox (const QuaternionBase< OtherDerived > &other, const RealScalar &prec=NumTraits< Scalar >::dummy_precision()) const |
| |
| EIGEN_STRONG_INLINE Vector3 | _transformVector (Vector3 v) const |
| |
| template<typename NewScalarType > |
| internal::cast_return_type< Derived, Quaternion< NewScalarType > >::type | cast () const |
| |
| template<class OtherDerived > |
| EIGEN_STRONG_INLINE Quaternion< typename internal::traits< Derived >::Scalar > | operator* (const QuaternionBase< OtherDerived > &other) const |
| |
| template<class MatrixDerived > |
| Derived & | operator= (const MatrixBase< MatrixDerived > &xpr) |
| |
| template<class OtherDerived > |
| internal::traits< Derived >::Scalar | angularDistance (const QuaternionBase< OtherDerived > &other) const |
| |
| template<class OtherDerived > |
| Quaternion< typename internal::traits< Derived >::Scalar > | slerp (const Scalar &t, const QuaternionBase< OtherDerived > &other) const |
| |
|
const Derived & | derived () const |
| |
|
Derived & | derived () |
| |
|
const Derived & | derived () const |
| |
|
Derived & | derived () |
| |
| RotationMatrixType | toRotationMatrix () const |
| |
| RotationMatrixType | toRotationMatrix () const |
| |
| Derived | inverse () const |
| |
| Derived | inverse () const |
| |
| Transform< Scalar, Dim > | operator* (const Translation< Scalar, Dim > &t) const |
| |
| RotationMatrixType | operator* (const Scaling< Scalar, Dim > &s) const |
| |
| Transform< Scalar, Dim > | operator* (const Transform< Scalar, Dim > &t) const |
| |
| Transform< Scalar, Dim, Isometry > | operator* (const Translation< Scalar, Dim > &t) const |
| |
| RotationMatrixType | operator* (const UniformScaling< Scalar > &s) const |
| |
| EIGEN_STRONG_INLINE internal::rotation_base_generic_product_selector< Derived, OtherDerived, OtherDerived::IsVectorAtCompileTime >::ReturnType | operator* (const EigenBase< OtherDerived > &e) const |
| |
| Transform< Scalar, Dim, Mode > | operator* (const Transform< Scalar, Dim, Mode, Options > &t) const |
| |
| RotationMatrixType | matrix () const |
| |
|
VectorType | _transformVector (const OtherVectorType &v) const |
| |
template<class Derived>
class Eigen::QuaternionBase< Derived >
Base class for quaternion expressions.
- Template Parameters
-
| Derived | derived type (CRTP) |
- See also
- class Quaternion
Definition at line 233 of file ForwardDeclarations.h.
template<class Derived >
template<typename Derived1 , typename Derived2 >
- Returns
- the quaternion which transform a into b through a rotation
Sets *this to be a quaternion representing a rotation between the two arbitrary vectors a and b. In other words, the built rotation represent a rotation sending the line of direction a to the line of direction b, both lines passing through the origin.
- Returns
- a reference to
*this.
Note that the two input vectors do not have to be normalized, and do not need to have the same norm.
Definition at line 573 of file Quaternion.h.
579 Scalar c = v1.dot(v0);
589 if (c < Scalar(-1)+NumTraits<Scalar>::dummy_precision())
591 c = max<Scalar>(c,-1);
592 Matrix<Scalar,2,3> m; m << v0.transpose(), v1.transpose();
594 Vector3 axis = svd.matrixV().col(2);
596 Scalar w2 = (Scalar(1)+c)*Scalar(0.5);
597 this->
w() = sqrt(w2);
598 this->
vec() = axis * sqrt(Scalar(1) - w2);
602 Scalar s = sqrt((Scalar(1)+c)*Scalar(2));
603 Scalar invs = Scalar(1)/s;
604 this->
vec() = axis * invs;
605 this->
w() = s * Scalar(0.5);
const VectorBlock< const Coefficients, 3 > vec() const
Matrix< Scalar, 3, 1 > Vector3