Main MRPT website > C++ reference
MRPT logo
Public Types | Public Member Functions | Protected Attributes | Private Types
Eigen::Quaternion Class Reference

Detailed Description

The quaternion class used to represent 3D orientations and rotations

Parameters:
_Scalarthe scalar type, i.e., the type of the coefficients

This class represents a quaternion $ w+xi+yj+zk $ 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:

See also:
class AngleAxis, class Transform
Inheritance diagram for Eigen::Quaternion:
Inheritance graph
[legend]

List of all members.

Public Types

typedef _Scalar Scalar
typedef internal::traits
< Quaternion< Scalar, _Options >
>::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 $ w+xi+yj+zk $ from its four coefficients w, x, y and z.
 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,
_Options > > 
Base

Member Typedef Documentation

the equivalent angle-axis type

Reimplemented from Eigen::QuaternionBase< Quaternion< _Scalar, _Options > >.

Definition at line 245 of file Geometry.

typedef QuaternionBase<Quaternion<_Scalar,_Options> > Eigen::Quaternion::Base [private]

Reimplemented from Eigen::QuaternionBase< Quaternion< _Scalar, _Options > >.

Definition at line 237 of file Geometry.

typedef internal::traits<Quaternion<Scalar,_Options> >::Coefficients Eigen::Quaternion::Coefficients

Reimplemented from Eigen::QuaternionBase< Quaternion< _Scalar, _Options > >.

Definition at line 244 of file Geometry.

typedef _Scalar Eigen::Quaternion::Scalar

Reimplemented from Eigen::QuaternionBase< Quaternion< _Scalar, _Options > >.

Definition at line 239 of file Geometry.


Constructor & Destructor Documentation

Eigen::Quaternion::Quaternion ( ) [inline]

Default constructor leaving the quaternion uninitialized.

Definition at line 248 of file Geometry.

Eigen::Quaternion::Quaternion ( Scalar  w,
Scalar  x,
Scalar  y,
Scalar  z 
) [inline]

Constructs and initializes the quaternion $ w+xi+yj+zk $ from its four coefficients w, x, y and z.

Warning:
Note the order of the arguments: the real w coefficient first, while internally the coefficients are stored in the following order: [x, y, z, w]

Definition at line 257 of file Geometry.

Eigen::Quaternion::Quaternion ( const Scalar *  data) [inline]

Constructs and initialize a quaternion from the array data.

Definition at line 260 of file Geometry.

template<class Derived >
EIGEN_STRONG_INLINE Eigen::Quaternion::Quaternion ( const QuaternionBase< Derived > &  other) [inline]

Copy constructor.

Definition at line 263 of file Geometry.

Eigen::Quaternion::Quaternion ( const AngleAxisType &  aa) [inline, explicit]

Constructs and initializes a quaternion from the angle-axis aa.

Definition at line 266 of file Geometry.

template<typename Derived >
Eigen::Quaternion::Quaternion ( const MatrixBase< Derived > &  other) [inline, explicit]

Constructs and initializes a quaternion from either:

  • a rotation matrix expression,
  • a 4D vector expression representing quaternion coefficients.

Definition at line 273 of file Geometry.


Member Function Documentation

Coefficients& Eigen::Quaternion::coeffs ( ) [inline]
Returns:
a vector expression of the coefficients (x,y,z,w)

Reimplemented from Eigen::QuaternionBase< Quaternion< _Scalar, _Options > >.

Definition at line 275 of file Geometry.

const Coefficients& Eigen::Quaternion::coeffs ( ) const [inline]
Returns:
a read-only vector expression of the coefficients (x,y,z,w)

Reimplemented from Eigen::QuaternionBase< Quaternion< _Scalar, _Options > >.

Definition at line 276 of file Geometry.


Member Data Documentation

Definition at line 279 of file Geometry.




Page generated by Doxygen 1.7.5 for MRPT 0.9.5 SVN: at Sun Oct 16 12:16:33 UTC 2011