The quaternion class used to represent 3D orientations and rotations. More...
Public Types | |
enum | |
typedef Base::AngleAxisType | AngleAxisType |
typedef QuaternionBase< Quaternion< Scalar_, Options_ > > | Base |
typedef internal::traits< Quaternion >::Coefficients | Coefficients |
typedef Scalar_ | Scalar |
![]() | |
enum | |
typedef AngleAxis< Scalar > | AngleAxisType |
typedef RotationBase< Quaternion< Scalar_, Options_ >, 3 > | Base |
typedef internal::traits< Quaternion< Scalar_, Options_ > >::Coefficients | Coefficients |
typedef Coefficients::CoeffReturnType | CoeffReturnType |
typedef Matrix< Scalar, 3, 3 > | Matrix3 |
typedef std::conditional_t< bool(internal::traits< Quaternion< Scalar_, Options_ > >::Flags &LvalueBit), Scalar &, CoeffReturnType > | NonConstCoeffReturnType |
typedef NumTraits< Scalar >::Real | RealScalar |
typedef internal::traits< Quaternion< Scalar_, Options_ > >::Scalar | Scalar |
typedef Matrix< Scalar, 3, 1 > | Vector3 |
![]() | |
enum | { Dim } |
typedef Matrix< Scalar, Dim, Dim > | RotationMatrixType |
typedef internal::traits< Derived >::Scalar | Scalar |
typedef Matrix< Scalar, Dim, 1 > | VectorType |
Public Member Functions | |
Coefficients & | coeffs () |
const Coefficients & | coeffs () const |
template<typename Derived1 , typename Derived2 > | |
Quaternion< Scalar, Options > | FromTwoVectors (const MatrixBase< Derived1 > &a, const MatrixBase< Derived2 > &b) |
Quaternion & | operator= (Quaternion &&other) EIGEN_NOEXCEPT_IF(std |
Quaternion () | |
Quaternion (const AngleAxisType &aa) | |
template<typename Derived > | |
Quaternion (const MatrixBase< Derived > &other) | |
template<typename OtherScalar , int OtherOptions> | |
Quaternion (const Quaternion< OtherScalar, OtherOptions > &other) | |
template<class Derived > | |
Quaternion (const QuaternionBase< Derived > &other) | |
template<typename Derived > | |
Quaternion (const Scalar &w, const Eigen::MatrixBase< Derived > &vec) | |
Quaternion (const Scalar &w, const Scalar &x, const Scalar &y, const Scalar &z) | |
Quaternion (const Scalar *data) | |
Quaternion (Quaternion &&other) EIGEN_NOEXCEPT_IF(std | |
![]() | |
Vector3 | _transformVector (const Vector3 &v) const |
Scalar | angularDistance (const QuaternionBase< OtherDerived > &other) const |
internal::traits< Quaternion< Scalar_, Options_ > >::Scalar | angularDistance (const QuaternionBase< OtherDerived > &other) const |
internal::cast_return_type< Quaternion< Scalar_, Options_ >, Quaternion< NewScalarType > >::type | cast () const |
internal::traits< Quaternion< Scalar_, Options_ > >::Coefficients & | coeffs () |
const internal::traits< Quaternion< Scalar_, Options_ > >::Coefficients & | coeffs () const |
Quaternion< Scalar > | conjugate () const |
Scalar | dot (const QuaternionBase< OtherDerived > &other) const |
Quaternion< Scalar > | inverse () const |
bool | isApprox (const QuaternionBase< OtherDerived > &other, const RealScalar &prec=NumTraits< Scalar >::dummy_precision()) const |
Scalar | norm () const |
void | normalize () |
Quaternion< Scalar > | normalized () const |
bool | operator!= (const QuaternionBase< OtherDerived > &other) const |
Quaternion< typename internal::traits< Quaternion< Scalar_, Options_ > >::Scalar > | operator* (const QuaternionBase< OtherDerived > &other) const |
Quaternion< Scalar > | operator* (const QuaternionBase< OtherDerived > &q) const |
Quaternion< Scalar_, Options_ > & | operator*= (const QuaternionBase< OtherDerived > &q) |
Quaternion< Scalar_, Options_ > & | operator= (const AngleAxisType &aa) |
Quaternion< Scalar_, Options_ > & | operator= (const MatrixBase< MatrixDerived > &xpr) |
Quaternion< Scalar_, Options_ > & | operator= (const MatrixBase< OtherDerived > &m) |
Quaternion< Scalar_, Options_ > & | operator= (const QuaternionBase< OtherDerived > &other) |
QuaternionBase< Quaternion< Scalar_, Options_ > > & | operator= (const QuaternionBase< Quaternion< Scalar_, Options_ > > &other) |
bool | operator== (const QuaternionBase< OtherDerived > &other) const |
Quaternion< Scalar_, Options_ > & | setFromTwoVectors (const MatrixBase< Derived1 > &a, const MatrixBase< Derived2 > &b) |
QuaternionBase & | setIdentity () |
Quaternion< Scalar > | slerp (const Scalar &t, const QuaternionBase< OtherDerived > &other) const |
Quaternion< typename internal::traits< Quaternion< Scalar_, Options_ > >::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 |
NonConstCoeffReturnType | w () |
CoeffReturnType | w () const |
NonConstCoeffReturnType | x () |
CoeffReturnType | x () const |
NonConstCoeffReturnType | y () |
CoeffReturnType | y () const |
NonConstCoeffReturnType | z () |
CoeffReturnType | z () const |
![]() | |
template<typename OtherVectorType > | |
VectorType | _transformVector (const OtherVectorType &v) const |
Derived & | derived () |
const Derived & | derived () const |
Derived | inverse () const |
RotationMatrixType | matrix () const |
template<typename OtherDerived > | |
internal::rotation_base_generic_product_selector< Derived, OtherDerived, OtherDerived::IsVectorAtCompileTime >::ReturnType | operator* (const EigenBase< OtherDerived > &e) const |
template<int Mode, int Options> | |
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 |
RotationMatrixType | toRotationMatrix () const |
Static Public Member Functions | |
template<typename Derived1 , typename Derived2 > | |
static Quaternion | FromTwoVectors (const MatrixBase< Derived1 > &a, const MatrixBase< Derived2 > &b) |
static Quaternion | UnitRandom () |
![]() | |
static Quaternion< Scalar > | Identity () |
Protected Attributes | |
Coefficients | m_coeffs |
The quaternion class used to represent 3D orientations and rotations.
Definition/implementation of Quaternion<Scalar> This is defined in the Geometry module.
Scalar_ | the scalar type, i.e., the type of the coefficients |
Options_ | controls the memory alignment of the coefficients. Can be # AutoAlign or # DontAlign. Default is AutoAlign. |
This class represents a quaternion
The following two typedefs are provided for convenience:
Quaternionf
for float
Quaterniond
for double
Definition at line 275 of file Quaternion.h.
typedef Base::AngleAxisType Eigen::Quaternion< Scalar_, Options_ >::AngleAxisType |
Definition at line 287 of file Quaternion.h.
typedef QuaternionBase<Quaternion<Scalar_,Options_> > Eigen::Quaternion< Scalar_, Options_ >::Base |
Definition at line 278 of file Quaternion.h.
typedef internal::traits<Quaternion>::Coefficients Eigen::Quaternion< Scalar_, Options_ >::Coefficients |
Definition at line 286 of file Quaternion.h.
typedef Scalar_ Eigen::Quaternion< Scalar_, Options_ >::Scalar |
Definition at line 281 of file Quaternion.h.
anonymous enum |
Definition at line 279 of file Quaternion.h.
|
inline |
Default constructor leaving the quaternion uninitialized.
Definition at line 290 of file Quaternion.h.
|
inline |
Constructs and initializes the quaternion
x
, y
, z
, w
] Definition at line 299 of file Quaternion.h.
|
inline |
Constructs and initializes a quaternion from its real part as a scalar, and its imaginary part as a 3-vector [x
, y
, z
]
Definition at line 305 of file Quaternion.h.
|
inlineexplicit |
Constructs and initialize a quaternion from the array data
Definition at line 311 of file Quaternion.h.
|
inline |
Copy constructor
Definition at line 314 of file Quaternion.h.
|
inlineexplicit |
Constructs and initializes a quaternion from the angle-axis aa
Definition at line 317 of file Quaternion.h.
|
inlineexplicit |
Constructs and initializes a quaternion from either:
x
, y
, z
, w
]. Definition at line 324 of file Quaternion.h.
|
inlineexplicit |
|
inline |
|
inline |
Definition at line 349 of file Quaternion.h.
|
inline |
Definition at line 350 of file Quaternion.h.
|
static |
Quaternion<Scalar,Options> Eigen::Quaternion< Scalar_, Options_ >::FromTwoVectors | ( | const MatrixBase< Derived1 > & | a, |
const MatrixBase< Derived2 > & | b | ||
) |
Returns 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.
Note that the two input vectors do not have to be normalized, and do not need to have the same norm.
Definition at line 711 of file Quaternion.h.
|
inline |
|
static |
Definition at line 685 of file Quaternion.h.
|
protected |
Definition at line 359 of file Quaternion.h.