The quaternion class used to represent 3D orientations and rotations. More...
#include <ForwardDeclarations.h>
Public Types | |
enum | |
typedef Base::AngleAxisType | AngleAxisType |
typedef QuaternionBase< Quaternion< _Scalar, _Options > > | Base |
typedef internal::traits< Quaternion >::Coefficients | Coefficients |
typedef _Scalar | Scalar |
Public Member Functions | |
EIGEN_DEVICE_FUNC Coefficients & | coeffs () |
const EIGEN_DEVICE_FUNC Coefficients & | coeffs () const |
template<typename Derived1 , typename Derived2 > | |
EIGEN_DEVICE_FUNC Quaternion< Scalar, Options > | FromTwoVectors (const MatrixBase< Derived1 > &a, const MatrixBase< Derived2 > &b) |
template<class OtherDerived > | |
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Derived & | operator*= (const QuaternionBase< OtherDerived > &q) |
EIGEN_DEVICE_FUNC | Quaternion () |
EIGEN_DEVICE_FUNC | Quaternion (const AngleAxisType &aa) |
template<typename Derived > | |
EIGEN_DEVICE_FUNC | Quaternion (const MatrixBase< Derived > &other) |
template<typename OtherScalar , int OtherOptions> | |
EIGEN_DEVICE_FUNC | Quaternion (const Quaternion< OtherScalar, OtherOptions > &other) |
template<class Derived > | |
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE | Quaternion (const QuaternionBase< Derived > &other) |
EIGEN_DEVICE_FUNC | Quaternion (const Scalar &w, const Scalar &x, const Scalar &y, const Scalar &z) |
EIGEN_DEVICE_FUNC | Quaternion (const Scalar *data) |
Static Public Member Functions | |
template<typename Derived1 , typename Derived2 > | |
static EIGEN_DEVICE_FUNC Quaternion | FromTwoVectors (const MatrixBase< Derived1 > &a, const MatrixBase< Derived2 > &b) |
static EIGEN_DEVICE_FUNC Quaternion | UnitRandom () |
Static Protected Member Functions | |
static EIGEN_STRONG_INLINE void | _check_template_params () |
Protected Attributes | |
Coefficients | m_coeffs |
The quaternion class used to represent 3D orientations and rotations.
\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 that is a convenient representation of orientations and rotations of objects in three dimensions. Compared to other representations like Euler angles or 3x3 matrices, quaternions offer the following advantages:
The following two typedefs are provided for convenience:
Quaternionf
for float
Quaterniond
for double
Definition at line 293 of file ForwardDeclarations.h.
Definition at line 285 of file 3rdparty/Eigen/Eigen/src/Geometry/Quaternion.h.
typedef QuaternionBase<Quaternion<_Scalar,_Options> > Eigen::Quaternion::Base |
Definition at line 276 of file 3rdparty/Eigen/Eigen/src/Geometry/Quaternion.h.
Definition at line 284 of file 3rdparty/Eigen/Eigen/src/Geometry/Quaternion.h.
typedef _Scalar Eigen::Quaternion::Scalar |
Definition at line 279 of file 3rdparty/Eigen/Eigen/src/Geometry/Quaternion.h.
anonymous enum |
Definition at line 277 of file 3rdparty/Eigen/Eigen/src/Geometry/Quaternion.h.
|
inline |
Default constructor leaving the quaternion uninitialized.
Definition at line 288 of file 3rdparty/Eigen/Eigen/src/Geometry/Quaternion.h.
|
inline |
Constructs and initializes the quaternion from its four coefficients w, x, y and z.
x
, y
, z
, w
] Definition at line 297 of file 3rdparty/Eigen/Eigen/src/Geometry/Quaternion.h.
|
inlineexplicit |
Constructs and initialize a quaternion from the array data
Definition at line 300 of file 3rdparty/Eigen/Eigen/src/Geometry/Quaternion.h.
|
inline |
Copy constructor
Definition at line 303 of file 3rdparty/Eigen/Eigen/src/Geometry/Quaternion.h.
|
inlineexplicit |
Constructs and initializes a quaternion from the angle-axis aa
Definition at line 306 of file 3rdparty/Eigen/Eigen/src/Geometry/Quaternion.h.
|
inlineexplicit |
Constructs and initializes a quaternion from either:
Definition at line 313 of file 3rdparty/Eigen/Eigen/src/Geometry/Quaternion.h.
|
inlineexplicit |
Explicit copy constructor with scalar conversion
Definition at line 317 of file 3rdparty/Eigen/Eigen/src/Geometry/Quaternion.h.
|
inlinestaticprotected |
Definition at line 353 of file 3rdparty/Eigen/Eigen/src/Geometry/Quaternion.h.
|
inline |
Definition at line 340 of file 3rdparty/Eigen/Eigen/src/Geometry/Quaternion.h.
|
inline |
Definition at line 341 of file 3rdparty/Eigen/Eigen/src/Geometry/Quaternion.h.
|
static |
EIGEN_DEVICE_FUNC Quaternion<Scalar,Options> Eigen::Quaternion::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 705 of file 3rdparty/Eigen/Eigen/src/Geometry/Quaternion.h.
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Derived & Eigen::QuaternionBase::operator*= | ( | class OtherDerived | ) |
Definition at line 516 of file 3rdparty/Eigen/Eigen/src/Geometry/Quaternion.h.
|
static |
Definition at line 679 of file 3rdparty/Eigen/Eigen/src/Geometry/Quaternion.h.
|
protected |
Definition at line 350 of file 3rdparty/Eigen/Eigen/src/Geometry/Quaternion.h.