Represents a 3D rotation as a rotation angle around an arbitrary 3D axis
- Parameters:
-
| _Scalar | the scalar type, i.e., the type of the coefficients. |
- Warning:
- When setting up an AngleAxis object, the axis vector must be normalized.
The following two typedefs are provided for convenience:
AngleAxisf for float
AngleAxisd for double
Combined with MatrixBase::Unit{X,Y,Z}, AngleAxis can be used to easily mimic Euler-angles. Here is an example:
Output:
- Note:
- This class is not aimed to be used to store a rotation transformation, but rather to make easier the creation of other rotation (Quaternion, rotation Matrix) and transformation objects.
- See also:
- class Quaternion, class Transform, MatrixBase::UnitX()
Public Types |
| enum | { Dim = 3
} |
| typedef _Scalar | Scalar |
| | the scalar type of the coefficients
|
| typedef Matrix< Scalar, 3, 3 > | Matrix3 |
| typedef Matrix< Scalar, 3, 1 > | Vector3 |
| typedef Quaternion< Scalar > | QuaternionType |
| enum | |
| typedef Matrix< Scalar, Dim, Dim > | RotationMatrixType |
| | corresponding linear transformation matrix type
|
| typedef Matrix< Scalar, Dim, 1 > | VectorType |
Public Member Functions |
| | AngleAxis () |
| | Default constructor without initialization.
|
| template<typename Derived > |
| | AngleAxis (Scalar angle, const MatrixBase< Derived > &axis) |
| | Constructs and initialize the angle-axis rotation from an angle in radian and an axis which must be normalized.
|
| template<typename QuatDerived > |
| | AngleAxis (const QuaternionBase< QuatDerived > &q) |
| | Constructs and initialize the angle-axis rotation from a quaternion q.
|
| template<typename Derived > |
| | AngleAxis (const MatrixBase< Derived > &m) |
| | Constructs and initialize the angle-axis rotation from a 3x3 rotation matrix.
|
| Scalar | angle () const |
| Scalar & | angle () |
| const Vector3 & | axis () const |
| Vector3 & | axis () |
| QuaternionType | operator* (const AngleAxis &other) const |
| | Concatenates two rotations.
|
| QuaternionType | operator* (const QuaternionType &other) const |
| | Concatenates two rotations.
|
| AngleAxis | inverse () const |
| template<class QuatDerived > |
| AngleAxis & | operator= (const QuaternionBase< QuatDerived > &q) |
| | Set *this from a unit quaternion.
|
| template<typename Derived > |
| AngleAxis & | operator= (const MatrixBase< Derived > &m) |
| | Set *this from a 3x3 rotation matrix mat.
|
| template<typename Derived > |
| AngleAxis & | fromRotationMatrix (const MatrixBase< Derived > &m) |
| | Sets *this from a 3x3 rotation matrix.
|
| Matrix3 | toRotationMatrix (void) const |
| | Constructs and.
|
| template<typename NewScalarType > |
internal::cast_return_type
< AngleAxis, AngleAxis
< NewScalarType > >::type | cast () const |
| template<typename OtherScalarType > |
| | AngleAxis (const AngleAxis< OtherScalarType > &other) |
| | Copy constructor with scalar type conversion.
|
| bool | isApprox (const AngleAxis &other, typename NumTraits< Scalar >::Real prec=NumTraits< Scalar >::dummy_precision()) const |
| const Derived & | derived () const |
| Derived & | derived () |
| RotationMatrixType | matrix () const |
| Transform< Scalar, Dim, Isometry > | operator* (const Translation< Scalar, Dim > &t) const |
| RotationMatrixType | operator* (const UniformScaling< Scalar > &s) const |
EIGEN_STRONG_INLINE
internal::rotation_base_generic_product_selector
< Derived, OtherDerived,
OtherDerived::IsVectorAtCompileTime >
::ReturnType | operator* (const EigenBase< OtherDerived > &e) const |
| Transform< Scalar, Dim, Mode > | operator* (const Transform< Scalar, Dim, Mode, Options > &t) const |
| VectorType | _transformVector (const OtherVectorType &v) const |
Static Public Member Functions |
| static const AngleAxis | Identity () |
Protected Attributes |
| Vector3 | m_axis |
| Scalar | m_angle |
Private Types |
typedef RotationBase
< AngleAxis< _Scalar >, 3 > | Base |
Friends |
| QuaternionType | operator* (const QuaternionType &a, const AngleAxis &b) |
| | Concatenates two rotations.
|
| RotationMatrixType | operator* (const EigenBase< OtherDerived > &l, const Derived &r) |
| Transform< Scalar, Dim, Affine > | operator* (const DiagonalMatrix< Scalar, Dim > &l, const Derived &r) |