The quaternion class used to represent 3D orientations and rotations. More...
Inherits QuaternionBase< Derived >.
Public Types | |
typedef _Scalar | Scalar |
Public Member Functions | |
template<class Derived > | |
Quaternion (const QuaternionBase< Derived > &other) | |
template<typename OtherScalar , int OtherOptions> | |
Quaternion (const Quaternion< OtherScalar, OtherOptions > &other) | |
template<typename Derived > | |
Quaternion (const MatrixBase< Derived > &other) | |
Quaternion (const AngleAxisType &aa) | |
Quaternion () | |
Quaternion (const Scalar *data) | |
Quaternion (Scalar w, Scalar x, Scalar y, Scalar z) |
The quaternion class used to represent 3D orientations and rotations.
This is defined in the Geometry module.
#include <Eigen/Geometry>
_Scalar | the scalar type, i.e., the type of the coefficients |
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, quatertions offer the following advantages:
The following two typedefs are provided for convenience:
Quaternionf
for float
Quaterniond
for double
typedef _Scalar Scalar |
the scalar type of the coefficients
Reimplemented from RotationBase< Derived, 3 >.
Quaternion | ( | ) | [inline] |
Default constructor leaving the quaternion uninitialized.
Quaternion | ( | Scalar | w, |
Scalar | x, | ||
Scalar | y, | ||
Scalar | z | ||
) | [inline] |
Constructs and initializes the quaternion from its four coefficients w, x, y and z.
x
, y
, z
, w
] Quaternion | ( | const Scalar * | data | ) | [inline] |
Constructs and initialize a quaternion from the array data
Quaternion | ( | const QuaternionBase< Derived > & | other | ) | [inline] |
Copy constructor
Quaternion | ( | const AngleAxisType & | aa | ) | [inline, explicit] |
Constructs and initializes a quaternion from the angle-axis aa
Quaternion | ( | const MatrixBase< Derived > & | other | ) | [inline, explicit] |
Constructs and initializes a quaternion from either:
Quaternion | ( | const Quaternion< OtherScalar, OtherOptions > & | other | ) | [inline, explicit] |
Explicit copy constructor with scalar conversion