The quaternion class used to represent 3D orientations and rotations
_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
Definition at line 231 of file Quaternion.h.
#include <src/Geometry/Quaternion.h>
Public Types | |
typedef _Scalar | Scalar |
the scalar type of the coefficients | |
typedef internal::traits < Quaternion< Scalar > >::Coefficients | Coefficients |
typedef Base::AngleAxisType | AngleAxisType |
the equivalent angle-axis type | |
Public Member Functions | |
Quaternion () | |
Default constructor leaving the quaternion uninitialized. | |
Quaternion (Scalar w, Scalar x, Scalar y, Scalar z) | |
Constructs and initializes the quaternion ![]() | |
Quaternion (const Scalar *data) | |
Constructs and initialize a quaternion from the array data. | |
template<class Derived > | |
EIGEN_STRONG_INLINE | Quaternion (const QuaternionBase< Derived > &other) |
Copy constructor. | |
Quaternion (const AngleAxisType &aa) | |
Constructs and initializes a quaternion from the angle-axis aa. | |
template<typename Derived > | |
Quaternion (const MatrixBase< Derived > &other) | |
Constructs and initializes a quaternion from either:
| |
Coefficients & | coeffs () |
const Coefficients & | coeffs () const |
Protected Attributes | |
Coefficients | m_coeffs |
Private Types | |
typedef QuaternionBase < Quaternion< _Scalar > > | Base |
typedef Base::AngleAxisType Quaternion< _Scalar >::AngleAxisType |
the equivalent angle-axis type
Reimplemented from QuaternionBase< Quaternion< _Scalar > >.
Definition at line 240 of file Quaternion.h.
typedef QuaternionBase<Quaternion<_Scalar> > Quaternion< _Scalar >::Base [private] |
Reimplemented from QuaternionBase< Quaternion< _Scalar > >.
Definition at line 232 of file Quaternion.h.
typedef internal::traits<Quaternion<Scalar> >::Coefficients Quaternion< _Scalar >::Coefficients |
Reimplemented from QuaternionBase< Quaternion< _Scalar > >.
Definition at line 239 of file Quaternion.h.
typedef _Scalar Quaternion< _Scalar >::Scalar |
the scalar type of the coefficients
Reimplemented from QuaternionBase< Quaternion< _Scalar > >.
Definition at line 234 of file Quaternion.h.
Quaternion< _Scalar >::Quaternion | ( | ) | [inline] |
Default constructor leaving the quaternion uninitialized.
Definition at line 243 of file Quaternion.h.
Quaternion< _Scalar >::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
] Definition at line 252 of file Quaternion.h.
Quaternion< _Scalar >::Quaternion | ( | const Scalar * | data | ) | [inline] |
Constructs and initialize a quaternion from the array data.
Definition at line 255 of file Quaternion.h.
EIGEN_STRONG_INLINE Quaternion< _Scalar >::Quaternion | ( | const QuaternionBase< Derived > & | other | ) | [inline] |
Copy constructor.
Definition at line 258 of file Quaternion.h.
References QuaternionBase< Quaternion< _Scalar > >::operator=().
Quaternion< _Scalar >::Quaternion | ( | const AngleAxisType & | aa | ) | [inline, explicit] |
Constructs and initializes a quaternion from the angle-axis aa.
Definition at line 261 of file Quaternion.h.
Quaternion< _Scalar >::Quaternion | ( | const MatrixBase< Derived > & | other | ) | [inline, explicit] |
Constructs and initializes a quaternion from either:
Definition at line 268 of file Quaternion.h.
Coefficients& Quaternion< _Scalar >::coeffs | ( | ) | [inline] |
Reimplemented from QuaternionBase< Quaternion< _Scalar > >.
Definition at line 270 of file Quaternion.h.
References Quaternion< _Scalar >::m_coeffs.
const Coefficients& Quaternion< _Scalar >::coeffs | ( | ) | const [inline] |
Reimplemented from QuaternionBase< Quaternion< _Scalar > >.
Definition at line 271 of file Quaternion.h.
References Quaternion< _Scalar >::m_coeffs.
Coefficients Quaternion< _Scalar >::m_coeffs [protected] |
Definition at line 274 of file Quaternion.h.
Referenced by Quaternion< _Scalar >::coeffs().
Page generated by Doxygen 1.7.3 for MRPT 0.9.4 SVN: at Sat Mar 26 06:40:17 UTC 2011 |