Base class for quaternion expressions. More...
#include <ForwardDeclarations.h>
Public Types | |
enum | { Flags = Eigen::internal::traits<Derived>::Flags } |
typedef AngleAxis< Scalar > | AngleAxisType |
typedef RotationBase< Derived, 3 > | Base |
typedef internal::traits< Derived >::Coefficients | Coefficients |
typedef Matrix< Scalar, 3, 3 > | Matrix3 |
typedef NumTraits< Scalar >::Real | RealScalar |
typedef internal::traits< Derived >::Scalar | Scalar |
typedef Matrix< Scalar, 3, 1 > | Vector3 |
Public Types inherited from Eigen::RotationBase< Derived, 3 > | |
enum | |
typedef Matrix< Scalar, Dim, Dim > | RotationMatrixType |
typedef internal::traits< Derived >::Scalar | Scalar |
typedef Matrix< Scalar, Dim, 1 > | VectorType |
Public Member Functions | |
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Vector3 | _transformVector (const Vector3 &v) const |
template<class OtherDerived > | |
EIGEN_DEVICE_FUNC Scalar | angularDistance (const QuaternionBase< OtherDerived > &other) const |
template<class OtherDerived > | |
EIGEN_DEVICE_FUNC internal::traits< Derived >::Scalar | angularDistance (const QuaternionBase< OtherDerived > &other) const |
template<typename NewScalarType > | |
EIGEN_DEVICE_FUNC internal::cast_return_type< Derived, Quaternion< NewScalarType > >::type | cast () const |
EIGEN_DEVICE_FUNC const internal::traits< Derived >::Coefficients & | coeffs () const |
EIGEN_DEVICE_FUNC internal::traits< Derived >::Coefficients & | coeffs () |
EIGEN_DEVICE_FUNC Quaternion< Scalar > | conjugate () const |
template<class OtherDerived > | |
EIGEN_DEVICE_FUNC Scalar | dot (const QuaternionBase< OtherDerived > &other) const |
EIGEN_DEVICE_FUNC Quaternion< Scalar > | inverse () const |
template<class OtherDerived > | |
EIGEN_DEVICE_FUNC bool | isApprox (const QuaternionBase< OtherDerived > &other, const RealScalar &prec=NumTraits< Scalar >::dummy_precision()) const |
EIGEN_DEVICE_FUNC Scalar | norm () const |
EIGEN_DEVICE_FUNC void | normalize () |
EIGEN_DEVICE_FUNC Quaternion< Scalar > | normalized () const |
template<class OtherDerived > | |
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Quaternion< Scalar > | operator* (const QuaternionBase< OtherDerived > &q) const |
template<class OtherDerived > | |
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Quaternion< typename internal::traits< Derived >::Scalar > | operator* (const QuaternionBase< OtherDerived > &other) const |
template<class OtherDerived > | |
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Derived & | operator*= (const QuaternionBase< OtherDerived > &q) |
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE QuaternionBase< Derived > & | operator= (const QuaternionBase< Derived > &other) |
template<class OtherDerived > | |
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Derived & | operator= (const QuaternionBase< OtherDerived > &other) |
EIGEN_DEVICE_FUNC Derived & | operator= (const AngleAxisType &aa) |
template<class OtherDerived > | |
EIGEN_DEVICE_FUNC Derived & | operator= (const MatrixBase< OtherDerived > &m) |
template<class MatrixDerived > | |
EIGEN_DEVICE_FUNC Derived & | operator= (const MatrixBase< MatrixDerived > &xpr) |
template<typename Derived1 , typename Derived2 > | |
EIGEN_DEVICE_FUNC Derived & | setFromTwoVectors (const MatrixBase< Derived1 > &a, const MatrixBase< Derived2 > &b) |
EIGEN_DEVICE_FUNC QuaternionBase & | setIdentity () |
template<class OtherDerived > | |
EIGEN_DEVICE_FUNC Quaternion< Scalar > | slerp (const Scalar &t, const QuaternionBase< OtherDerived > &other) const |
template<class OtherDerived > | |
EIGEN_DEVICE_FUNC Quaternion< typename internal::traits< Derived >::Scalar > | slerp (const Scalar &t, const QuaternionBase< OtherDerived > &other) const |
EIGEN_DEVICE_FUNC Scalar | squaredNorm () const |
EIGEN_DEVICE_FUNC Matrix3 | toRotationMatrix () const |
EIGEN_DEVICE_FUNC const VectorBlock< const Coefficients, 3 > | vec () const |
EIGEN_DEVICE_FUNC VectorBlock< Coefficients, 3 > | vec () |
EIGEN_DEVICE_FUNC Scalar | w () const |
EIGEN_DEVICE_FUNC Scalar & | w () |
EIGEN_DEVICE_FUNC Scalar | x () const |
EIGEN_DEVICE_FUNC Scalar & | x () |
EIGEN_DEVICE_FUNC Scalar | y () const |
EIGEN_DEVICE_FUNC Scalar & | y () |
EIGEN_DEVICE_FUNC Scalar | z () const |
EIGEN_DEVICE_FUNC Scalar & | z () |
Public Member Functions inherited from Eigen::RotationBase< Derived, 3 > | |
EIGEN_DEVICE_FUNC VectorType | _transformVector (const OtherVectorType &v) const |
EIGEN_DEVICE_FUNC const Derived & | derived () const |
EIGEN_DEVICE_FUNC Derived & | derived () |
EIGEN_DEVICE_FUNC Derived | inverse () const |
EIGEN_DEVICE_FUNC RotationMatrixType | matrix () const |
EIGEN_DEVICE_FUNC Transform< Scalar, Dim, Isometry > | operator* (const Translation< Scalar, Dim > &t) const |
EIGEN_DEVICE_FUNC RotationMatrixType | operator* (const UniformScaling< Scalar > &s) const |
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE internal::rotation_base_generic_product_selector< Derived, OtherDerived, OtherDerived::IsVectorAtCompileTime >::ReturnType | operator* (const EigenBase< OtherDerived > &e) const |
EIGEN_DEVICE_FUNC Transform< Scalar, Dim, Mode > | operator* (const Transform< Scalar, Dim, Mode, Options > &t) const |
EIGEN_DEVICE_FUNC RotationMatrixType | toRotationMatrix () const |
Static Public Member Functions | |
static EIGEN_DEVICE_FUNC Quaternion< Scalar > | Identity () |
Base class for quaternion expressions.
Derived | derived type (CRTP) |
Definition at line 268 of file ForwardDeclarations.h.
typedef AngleAxis<Scalar> Eigen::QuaternionBase< Derived >::AngleAxisType |
the equivalent angle-axis type
Definition at line 56 of file Quaternion.h.
typedef RotationBase<Derived, 3> Eigen::QuaternionBase< Derived >::Base |
Definition at line 38 of file Quaternion.h.
typedef internal::traits<Derived>::Coefficients Eigen::QuaternionBase< Derived >::Coefficients |
Definition at line 45 of file Quaternion.h.
typedef Matrix<Scalar,3,3> Eigen::QuaternionBase< Derived >::Matrix3 |
the equivalent rotation matrix type
Definition at line 54 of file Quaternion.h.
typedef NumTraits<Scalar>::Real Eigen::QuaternionBase< Derived >::RealScalar |
Definition at line 44 of file Quaternion.h.
typedef internal::traits<Derived>::Scalar Eigen::QuaternionBase< Derived >::Scalar |
Definition at line 43 of file Quaternion.h.
typedef Matrix<Scalar,3,1> Eigen::QuaternionBase< Derived >::Vector3 |
the type of a 3D vector
Definition at line 52 of file Quaternion.h.
anonymous enum |
Enumerator | |
---|---|
Flags |
Definition at line 46 of file Quaternion.h.
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE QuaternionBase< Derived >::Vector3 Eigen::QuaternionBase< Derived >::_transformVector | ( | const Vector3 & | v | ) | const |
return the result vector of v through the rotation
Rotation of a vector by a quaternion.
Definition at line 470 of file Quaternion.h.
EIGEN_DEVICE_FUNC Scalar Eigen::QuaternionBase< Derived >::angularDistance | ( | const QuaternionBase< OtherDerived > & | other | ) | const |
|
inline |
Definition at line 703 of file Quaternion.h.
|
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
.
Definition at line 173 of file Quaternion.h.
|
inline |
Definition at line 85 of file Quaternion.h.
|
inline |
Definition at line 88 of file Quaternion.h.
|
inline |
*this
which is equal to the multiplicative inverse if the quaternion is normalized. The conjugate of a quaternion represents the opposite rotation.Definition at line 690 of file Quaternion.h.
|
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. Definition at line 134 of file Quaternion.h.
|
inlinestatic |
Definition at line 106 of file Quaternion.h.
|
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.Definition at line 659 of file Quaternion.h.
|
inline |
true
if *this
is approximately equal to other, within the precision determined by prec.Definition at line 161 of file Quaternion.h.
|
inline |
Definition at line 120 of file Quaternion.h.
|
inline |
Normalizes the quaternion *this
Definition at line 124 of file Quaternion.h.
|
inline |
*this
Definition at line 127 of file Quaternion.h.
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Quaternion<Scalar> Eigen::QuaternionBase< Derived >::operator* | ( | const QuaternionBase< OtherDerived > & | q | ) | const |
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Quaternion<typename internal::traits<Derived>::Scalar> Eigen::QuaternionBase< Derived >::operator* | ( | const QuaternionBase< OtherDerived > & | other | ) | const |
Definition at line 444 of file Quaternion.h.
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Derived & Eigen::QuaternionBase< Derived >::operator*= | ( | const QuaternionBase< OtherDerived > & | other | ) |
Definition at line 455 of file Quaternion.h.
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE QuaternionBase< Derived > & Eigen::QuaternionBase< Derived >::operator= | ( | const QuaternionBase< Derived > & | other | ) |
Definition at line 483 of file Quaternion.h.
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Derived & Eigen::QuaternionBase< Derived >::operator= | ( | const QuaternionBase< OtherDerived > & | other | ) |
Definition at line 491 of file Quaternion.h.
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Derived & Eigen::QuaternionBase< Derived >::operator= | ( | const AngleAxisType & | aa | ) |
Set *this
from an angle-axis aa and returns a reference to *this
Definition at line 500 of file Quaternion.h.
EIGEN_DEVICE_FUNC Derived& Eigen::QuaternionBase< Derived >::operator= | ( | const MatrixBase< OtherDerived > & | m | ) |
|
inline |
Set *this
from the expression xpr:
Definition at line 518 of file Quaternion.h.
|
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.
Definition at line 577 of file Quaternion.h.
|
inline |
Definition at line 110 of file Quaternion.h.
EIGEN_DEVICE_FUNC Quaternion<Scalar> Eigen::QuaternionBase< Derived >::slerp | ( | const Scalar & | t, |
const QuaternionBase< OtherDerived > & | other | ||
) | const |
EIGEN_DEVICE_FUNC 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.
Definition at line 721 of file Quaternion.h.
|
inline |
Definition at line 115 of file Quaternion.h.
|
inline |
Convert the quaternion to a 3x3 rotation matrix. The quaternion is required to be normalized, otherwise the result is undefined.
Definition at line 531 of file Quaternion.h.
|
inline |
Definition at line 79 of file Quaternion.h.
|
inline |
Definition at line 82 of file Quaternion.h.
|
inline |
w
coefficient Definition at line 67 of file Quaternion.h.
|
inline |
w
coefficient Definition at line 76 of file Quaternion.h.
|
inline |
x
coefficient Definition at line 61 of file Quaternion.h.
|
inline |
x
coefficient Definition at line 70 of file Quaternion.h.
|
inline |
y
coefficient Definition at line 63 of file Quaternion.h.
|
inline |
y
coefficient Definition at line 72 of file Quaternion.h.
|
inline |
z
coefficient Definition at line 65 of file Quaternion.h.
|
inline |
z
coefficient Definition at line 74 of file Quaternion.h.