![]() |
Eigen
3.2.10
|
Base class for quaternion expressions.
This is defined in the Geometry module.
| Derived | derived type (CRTP) |
Inheritance diagram for QuaternionBase< Derived >:Public Types | |
| typedef AngleAxis< Scalar > | AngleAxisType |
| typedef Matrix< Scalar, 3, 3 > | Matrix3 |
| typedef Matrix< Scalar, Dim, Dim > | RotationMatrixType |
| typedef Matrix< Scalar, Dim, Dim > | RotationMatrixType |
| typedef Matrix< Scalar, 3, 1 > | Vector3 |
Public Member Functions | |
| Vector3 | _transformVector (const Vector3 &v) const |
| template<class OtherDerived> | |
| internal::traits< Derived >::Scalar | angularDistance (const QuaternionBase< OtherDerived > &other) const |
| template<typename NewScalarType> | |
| internal::cast_return_type< Derived, Quaternion< NewScalarType > >::type | cast () const |
| internal::traits< Derived >::Coefficients & | coeffs () |
| const internal::traits< Derived >::Coefficients & | coeffs () const |
| Quaternion< Scalar > | conjugate () const |
| template<class OtherDerived> | |
| Scalar | dot (const QuaternionBase< OtherDerived > &other) const |
| Quaternion< Scalar > | inverse () const |
| template<class OtherDerived> | |
| bool | isApprox (const QuaternionBase< OtherDerived > &other, const RealScalar &prec=NumTraits< Scalar >::dummy_precision()) const |
| RotationMatrixType | matrix () const |
| RotationMatrixType | matrix () const |
| Scalar | norm () const |
| void | normalize () |
| Quaternion< Scalar > | normalized () const |
| internal::rotation_base_generic_product_selector< Derived, OtherDerived, OtherDerived::IsVectorAtCompileTime >::ReturnType | operator* (const EigenBase< OtherDerived > &e) const |
| template<class OtherDerived> | |
| Quaternion< typename internal::traits< Derived >::Scalar > | operator* (const QuaternionBase< OtherDerived > &other) const |
| Transform< Scalar, Dim, Mode > | operator* (const Transform< Scalar, Dim, Mode, Options > &t) const |
| Transform< Scalar, Dim, Isometry > | operator* (const Translation< Scalar, Dim > &t) const |
| RotationMatrixType | operator* (const UniformScaling< Scalar > &s) const |
| template<class OtherDerived> | |
| Derived & | operator*= (const QuaternionBase< OtherDerived > &q) |
| Derived & | operator= (const AngleAxisType &aa) |
| template<class MatrixDerived> | |
| Derived & | operator= (const MatrixBase< MatrixDerived > &xpr) |
| template<typename Derived1, typename Derived2> | |
| Derived & | setFromTwoVectors (const MatrixBase< Derived1 > &a, const MatrixBase< Derived2 > &b) |
| QuaternionBase & | setIdentity () |
| template<class OtherDerived> | |
| Quaternion< typename internal::traits< Derived >::Scalar > | slerp (const Scalar &t, const QuaternionBase< OtherDerived > &other) const |
| Scalar | squaredNorm () const |
| Matrix3 | toRotationMatrix () const |
| VectorBlock< Coefficients, 3 > | vec () |
| const VectorBlock< const Coefficients, 3 > | vec () const |
| Scalar & | w () |
| Scalar | w () const |
| Scalar & | x () |
| Scalar | x () const |
| Scalar & | y () |
| Scalar | y () const |
| Scalar & | z () |
| Scalar | z () const |
Static Public Member Functions | |
| static Quaternion< Scalar > | Identity () |
| typedef AngleAxis<Scalar> AngleAxisType |
the equivalent angle-axis type
|
inherited |
corresponding linear transformation matrix type
|
inherited |
corresponding linear transformation matrix type
|
inline |
return the result vector of v through the rotation
Rotation of a vector by a quaternion.
|
inline |
|
inline |
*this with scalar type casted to NewScalarType Note that if NewScalarType is equal to the current scalar type of *this then this function smartly returns a const reference to *this.
|
inline |
|
inline |
Referenced by QuaternionBase< Quaternion< _Scalar, _Options > >::dot(), inverse(), QuaternionBase< Quaternion< _Scalar, _Options > >::isApprox(), QuaternionBase< Quaternion< _Scalar, _Options > >::norm(), QuaternionBase< Quaternion< _Scalar, _Options > >::normalize(), QuaternionBase< Quaternion< _Scalar, _Options > >::normalized(), QuaternionBase< Quaternion< _Scalar, _Options > >::setIdentity(), QuaternionBase< Quaternion< _Scalar, _Options > >::slerp(), QuaternionBase< Quaternion< _Scalar, _Options > >::squaredNorm(), QuaternionBase< Quaternion< _Scalar, _Options > >::vec(), and QuaternionBase< Quaternion< _Scalar, _Options > >::vec().
|
inline |
*this which is equal to the multiplicative inverse if the quaternion is normalized. The conjugate of a quaternion represents the opposite rotation.References w(), x(), y(), and z().
Referenced by QuaternionBase< Quaternion< _Scalar, _Options > >::angularDistance(), and inverse().
|
inline |
*this and other Geometrically speaking, the dot product of two unit quaternions corresponds to the cosine of half the angle between the two rotations.
|
inlinestatic |
|
inline |
*this Note that in most cases, i.e., if you simply want the opposite rotation, and/or the quaternion is normalized, then it is enough to use the conjugate.References coeffs(), conjugate(), and squaredNorm().
|
inline |
true if *this is approximately equal to other, within the precision determined by prec.
|
inlineinherited |
|
inlineinherited |
|
inline |
|
inline |
Normalizes the quaternion *this
|
inline |
*this Referenced by QuaternionBase< Quaternion< _Scalar, _Options > >::normalized().
|
inline |
*this with a generic expression e e can be:
|
inline |
|
inline |
*this with a transformation t
|
inline |
*this with a translation t
|
inline |
*this with a uniform scaling s
|
inline |
|
inline |
Set *this from an angle-axis aa and returns a reference to *this
References AngleAxis< _Scalar >::angle(), AngleAxis< _Scalar >::axis(), vec(), and w().
|
inline |
Set *this from the expression xpr:
|
inline |
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.
*this.Note that the two input vectors do not have to be normalized, and do not need to have the same norm.
References MatrixBase< Matrix< _Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols > >::col(), Eigen::ComputeFullV, MatrixBase< Matrix< _Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols > >::cross(), MatrixBase< Matrix< _Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols > >::dot(), JacobiSVD< _MatrixType, QRPreconditioner >::matrixV(), MatrixBase< Derived >::normalized(), MatrixBase< Matrix< _Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols > >::transpose(), vec(), and w().
Referenced by Quaternion< Scalar >::FromTwoVectors().
|
inline |
| Quaternion< typename internal::traits< Derived >::Scalar > slerp | ( | const Scalar & | t, |
| const QuaternionBase< OtherDerived > & | other ) const |
*this and other at the parameter t in [0;1].This represents an interpolation for a constant motion between *this and other, see also http://en.wikipedia.org/wiki/Slerp.
|
inline |
Referenced by inverse().
|
inline |
|
inline |
|
inline |
Referenced by _transformVector(), QuaternionBase< Quaternion< _Scalar, _Options > >::angularDistance(), AngleAxis< float >::operator=(), operator=(), and setFromTwoVectors().
|
inline |
w coefficient
|
inline |
w coefficient Referenced by _transformVector(), QuaternionBase< Quaternion< _Scalar, _Options > >::angularDistance(), conjugate(), AngleAxis< float >::operator=(), operator=(), setFromTwoVectors(), and toRotationMatrix().
|
inline |
x coefficient
|
inline |
x coefficient Referenced by conjugate(), and toRotationMatrix().
|
inline |
y coefficient
|
inline |
y coefficient Referenced by conjugate(), and toRotationMatrix().
|
inline |
z coefficient
|
inline |
z coefficient Referenced by conjugate(), and toRotationMatrix().