![]() |
Eigen
5.0.1-dev+60122df6
|
#include <Eigen/src/Geometry/Quaternion.h>
Base class for quaternion expressions.
This is defined in the Geometry module.
| Derived | derived type (CRTP) |
Inheritance diagram for Eigen::QuaternionBase< Derived >:Public Types | |
| typedef AngleAxis< Scalar > | AngleAxisType |
| typedef Matrix< Scalar, 3, 3 > | Matrix3 |
| typedef Matrix< Scalar, 3, 1 > | Vector3 |
Public Types inherited from Eigen::RotationBase< Derived, 3 > | |
| typedef Matrix< Scalar, Dim, Dim > | RotationMatrixType |
| typedef Matrix< Scalar, Dim, Dim > | RotationMatrixType |
| typedef internal::traits< Derived >::Scalar | Scalar |
| typedef internal::traits< Derived >::Scalar | Scalar |
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 |
| internal::traits< Derived >::Coefficients | coeffsScalarFirst () const |
| internal::traits< Derived >::Coefficients | coeffsScalarLast () 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 |
| Scalar | norm () const |
| void | normalize () |
| Quaternion< Scalar > | normalized () const |
| template<class OtherDerived> | |
| bool | operator!= (const QuaternionBase< OtherDerived > &other) 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<class OtherDerived> | |
| bool | operator== (const QuaternionBase< OtherDerived > &other) const |
| 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 |
| constexpr NonConstCoeffReturnType | w () |
| constexpr CoeffReturnType | w () const |
| constexpr NonConstCoeffReturnType | x () |
| constexpr CoeffReturnType | x () const |
| constexpr NonConstCoeffReturnType | y () |
| constexpr CoeffReturnType | y () const |
| constexpr NonConstCoeffReturnType | z () |
| constexpr CoeffReturnType | z () const |
Public Member Functions inherited from Eigen::RotationBase< Derived, 3 > | |
| Derived | inverse () const |
| Derived | inverse () const |
| RotationMatrixType | matrix () const |
| RotationMatrixType | matrix () const |
| internal::rotation_base_generic_product_selector< Derived, OtherDerived, OtherDerived::IsVectorAtCompileTime >::ReturnType | operator* (const EigenBase< OtherDerived > &e) const |
| 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 |
| Transform< Scalar, Dim, Mode > | operator* (const Transform< Scalar, Dim, Mode, Options > &t) const |
| Transform< Scalar, Dim, Isometry > | operator* (const Translation< Scalar, Dim > &t) const |
| Transform< Scalar, Dim, Isometry > | operator* (const Translation< Scalar, Dim > &t) const |
| RotationMatrixType | operator* (const UniformScaling< Scalar > &s) const |
| RotationMatrixType | operator* (const UniformScaling< Scalar > &s) const |
| RotationMatrixType | toRotationMatrix () const |
| RotationMatrixType | toRotationMatrix () const |
Static Public Member Functions | |
| static Quaternion< Scalar > | Identity () |
| typedef AngleAxis<Scalar> Eigen::QuaternionBase< Derived >::AngleAxisType |
the equivalent angle-axis type
| typedef Matrix<Scalar, 3, 3> Eigen::QuaternionBase< Derived >::Matrix3 |
the equivalent rotation matrix type
| typedef Matrix<Scalar, 3, 1> Eigen::QuaternionBase< Derived >::Vector3 |
the type of a 3D vector
|
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 |
|
inline |
w, x, y, z].This is the order expected by the
constructor, but not the order of the internal vector representation. Therefore, it returns a newly constructed vector.
|
inline |
x, y, z, w].This is equivalent to
, but returns a newly constructed vector for uniformity with
.
|
inline |
*this which is equal to the multiplicative inverse if the quaternion is normalized. The conjugate of a quaternion represents the opposite rotation.
|
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.
|
inline |
true if *this is approximately equal to other, within the precision determined by prec.
|
inline |
|
inline |
Normalizes the quaternion *this
|
inline |
*this
|
inline |
*this and other are not exactly equal to each other.
|
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
|
inline |
Set *this from the expression xpr:
|
inline |
*this and other are all exactly equal.
|
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.
|
inline |
| Quaternion< typename internal::traits< Derived >::Scalar > Eigen::QuaternionBase< Derived >::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 |
|
inline |
Convert the quaternion to a 3x3 rotation matrix. The quaternion is required to be normalized, otherwise the result is undefined.
|
inline |
|
inline |
|
inlineconstexpr |
w coefficient (if Derived is a non-const lvalue)
|
inlineconstexpr |
w coefficient
|
inlineconstexpr |
x coefficient (if Derived is a non-const lvalue)
|
inlineconstexpr |
x coefficient
|
inlineconstexpr |
y coefficient (if Derived is a non-const lvalue)
|
inlineconstexpr |
y coefficient
|
inlineconstexpr |
z coefficient (if Derived is a non-const lvalue)
|
inlineconstexpr |
z coefficient