Represents a rotation in a 3 dimensional space as three Euler angles. More...
#include <EulerAngles.h>
Public Types | |
typedef AngleAxis< Scalar > | AngleAxisType |
typedef RotationBase< EulerAngles< _Scalar, _System >, 3 > | Base |
typedef Matrix< Scalar, 3, 3 > | Matrix3 |
typedef Quaternion< Scalar > | QuaternionType |
typedef NumTraits< Scalar >::Real | RealScalar |
typedef _Scalar | Scalar |
typedef _System | System |
typedef Matrix< Scalar, 3, 1 > | Vector3 |
Public Types inherited from Eigen::RotationBase< EulerAngles< _Scalar, _System >, 3 > | |
enum | |
typedef Matrix< Scalar, Dim, Dim > | RotationMatrixType |
typedef internal::traits< Derived >::Scalar | Scalar |
typedef Matrix< Scalar, Dim, 1 > | VectorType |
Static Public Member Functions | |
static Vector3 | AlphaAxisVector () |
static Vector3 | BetaAxisVector () |
static Vector3 | GammaAxisVector () |
Private Attributes | |
Vector3 | m_angles |
Friends | |
std::ostream & | operator<< (std::ostream &s, const EulerAngles< Scalar, System > &eulerAngles) |
Represents a rotation in a 3 dimensional space as three Euler angles.
Euler rotation is a set of three rotation of three angles over three fixed axes, defined by the EulerSystem given as a template parameter.
Here is how intrinsic Euler angles works:
It has been proved(see Wikipedia link below) that every rotation can be represented by Euler angles, but there is no single representation (e.g. unlike rotation matrices). Therefore, you can convert from Eigen rotation and to them (including rotation matrices, which is not called "rotations" by Eigen design).
Euler angles usually used for:
However, Euler angles are slow comparing to quaternion or matrices, because their unnatural math definition, although it's simple for human. To overcome this, this class provide easy movement from the math friendly representation to the human friendly representation, and vise-versa.
All the user need to do is a safe simple C++ type conversion, and this class take care for the math. Additionally, some axes related computation is done in compile time.
Rotations representation as EulerAngles are not single (unlike matrices), and even have infinite EulerAngles representations.
For example, add or subtract 2*PI from either angle of EulerAngles and you'll get the same rotation. This is the general reason for infinite representation, but it's not the only general reason for not having a single representation.
When converting rotation to EulerAngles, this class convert it to specific ranges When converting some rotation to EulerAngles, the rules for ranges are as follow:
Convenient typedefs for EulerAngles exist for float and double scalar, in a form of EulerAngles{A}{B}{C}{scalar}, e.g. EulerAnglesXYZd, EulerAnglesZYZf.
Only for positive axes{+x,+y,+z} Euler systems are have convenient typedef. If you need negative axes{-x,-y,-z}, it is recommended to create you own typedef with a word that represent what you need.
Output:
If you're want to get more idea about how Euler system work in Eigen see EulerSystem.
More information about Euler angles: https://en.wikipedia.org/wiki/Euler_angles
_Scalar | the scalar type, i.e. the type of the angles. |
_System | the EulerSystem to use, which represents the axes of rotation. |
Definition at line 100 of file unsupported/Eigen/src/EulerAngles/EulerAngles.h.
typedef AngleAxis<Scalar> Eigen::EulerAngles< _Scalar, _System >::AngleAxisType |
the equivalent angle-axis type
Definition at line 115 of file unsupported/Eigen/src/EulerAngles/EulerAngles.h.
typedef RotationBase<EulerAngles<_Scalar, _System>, 3> Eigen::EulerAngles< _Scalar, _System >::Base |
Definition at line 103 of file unsupported/Eigen/src/EulerAngles/EulerAngles.h.
typedef Matrix<Scalar,3,3> Eigen::EulerAngles< _Scalar, _System >::Matrix3 |
the equivalent rotation matrix type
Definition at line 112 of file unsupported/Eigen/src/EulerAngles/EulerAngles.h.
typedef Quaternion<Scalar> Eigen::EulerAngles< _Scalar, _System >::QuaternionType |
the equivalent quaternion type
Definition at line 114 of file unsupported/Eigen/src/EulerAngles/EulerAngles.h.
typedef NumTraits<Scalar>::Real Eigen::EulerAngles< _Scalar, _System >::RealScalar |
Definition at line 107 of file unsupported/Eigen/src/EulerAngles/EulerAngles.h.
typedef _Scalar Eigen::EulerAngles< _Scalar, _System >::Scalar |
the scalar type of the angles
Definition at line 106 of file unsupported/Eigen/src/EulerAngles/EulerAngles.h.
typedef _System Eigen::EulerAngles< _Scalar, _System >::System |
the EulerSystem to use, which represents the axes of rotation.
Definition at line 110 of file unsupported/Eigen/src/EulerAngles/EulerAngles.h.
typedef Matrix<Scalar,3,1> Eigen::EulerAngles< _Scalar, _System >::Vector3 |
the equivalent 3 dimension vector type
Definition at line 113 of file unsupported/Eigen/src/EulerAngles/EulerAngles.h.
|
inline |
Default constructor without initialization.
Definition at line 140 of file unsupported/Eigen/src/EulerAngles/EulerAngles.h.
|
inline |
Constructs and initialize an EulerAngles (alpha
, beta
, gamma
).
Definition at line 142 of file unsupported/Eigen/src/EulerAngles/EulerAngles.h.
|
inlineexplicit |
Constructs and initialize an EulerAngles from the array data {alpha, beta, gamma}
Definition at line 147 of file unsupported/Eigen/src/EulerAngles/EulerAngles.h.
|
inlineexplicit |
Constructs and initializes an EulerAngles from either:
other
is a 3x3 rotation matrix, the angles range rules will be as follow:Definition at line 162 of file unsupported/Eigen/src/EulerAngles/EulerAngles.h.
|
inline |
Constructs and initialize Euler angles from a rotation rot
.
rot
is an EulerAngles (even when it represented as RotationBase explicitly), angles ranges are undefined. Otherwise, alpha and gamma angles will be in the range [-PI, PI].Definition at line 176 of file unsupported/Eigen/src/EulerAngles/EulerAngles.h.
|
inline |
Definition at line 200 of file unsupported/Eigen/src/EulerAngles/EulerAngles.h.
|
inline |
Definition at line 198 of file unsupported/Eigen/src/EulerAngles/EulerAngles.h.
|
inlinestatic |
Definition at line 118 of file unsupported/Eigen/src/EulerAngles/EulerAngles.h.
|
inline |
Definition at line 195 of file unsupported/Eigen/src/EulerAngles/EulerAngles.h.
|
inline |
Definition at line 193 of file unsupported/Eigen/src/EulerAngles/EulerAngles.h.
|
inline |
Definition at line 205 of file unsupported/Eigen/src/EulerAngles/EulerAngles.h.
|
inline |
Definition at line 203 of file unsupported/Eigen/src/EulerAngles/EulerAngles.h.
|
inlinestatic |
Definition at line 124 of file unsupported/Eigen/src/EulerAngles/EulerAngles.h.
|
inline |
*this
with scalar type casted to NewScalarType Definition at line 292 of file unsupported/Eigen/src/EulerAngles/EulerAngles.h.
|
inline |
Definition at line 210 of file unsupported/Eigen/src/EulerAngles/EulerAngles.h.
|
inline |
Definition at line 208 of file unsupported/Eigen/src/EulerAngles/EulerAngles.h.
|
inlinestatic |
Definition at line 130 of file unsupported/Eigen/src/EulerAngles/EulerAngles.h.
|
inline |
Definition at line 215 of file unsupported/Eigen/src/EulerAngles/EulerAngles.h.
|
inline |
true
if *this
is approximately equal to other, within the precision determined by prec.Definition at line 264 of file unsupported/Eigen/src/EulerAngles/EulerAngles.h.
|
inline |
Convert the Euler angles to quaternion.
Definition at line 276 of file unsupported/Eigen/src/EulerAngles/EulerAngles.h.
|
inline |
Definition at line 225 of file unsupported/Eigen/src/EulerAngles/EulerAngles.h.
|
inline |
Set *this
from either:
See EulerAngles(const MatrixBase<Derived, 3>&) for more information about angles ranges output.
Definition at line 238 of file unsupported/Eigen/src/EulerAngles/EulerAngles.h.
|
inline |
Set *this
from a rotation.
See EulerAngles(const RotationBase<Derived, 3>&) for more information about angles ranges output.
Definition at line 255 of file unsupported/Eigen/src/EulerAngles/EulerAngles.h.
|
inline |
Definition at line 269 of file unsupported/Eigen/src/EulerAngles/EulerAngles.h.
|
friend |
Definition at line 284 of file unsupported/Eigen/src/EulerAngles/EulerAngles.h.
|
private |
Definition at line 136 of file unsupported/Eigen/src/EulerAngles/EulerAngles.h.