Represents a 3D rotation as a rotation angle around an arbitrary 3D axis. More...
Public Types | |
enum | { Dim } |
typedef Matrix< Scalar, 3, 3 > | Matrix3 |
typedef Quaternion< Scalar > | QuaternionType |
typedef _Scalar | Scalar |
typedef Matrix< Scalar, 3, 1 > | Vector3 |
![]() | |
enum | |
typedef Matrix< Scalar, Dim, Dim > | RotationMatrixType |
typedef ei_traits< AngleAxis < _Scalar > >::Scalar | Scalar |
Public Member Functions | |
Scalar | angle () const |
Scalar & | angle () |
AngleAxis () | |
template<typename Derived > | |
AngleAxis (Scalar angle, const MatrixBase< Derived > &axis) | |
AngleAxis (const QuaternionType &q) | |
template<typename Derived > | |
AngleAxis (const MatrixBase< Derived > &m) | |
template<typename OtherScalarType > | |
AngleAxis (const AngleAxis< OtherScalarType > &other) | |
const Vector3 & | axis () const |
Vector3 & | axis () |
template<typename NewScalarType > | |
ei_cast_return_type< AngleAxis, AngleAxis< NewScalarType > >::type | cast () const |
template<typename Derived > | |
AngleAxis & | fromRotationMatrix (const MatrixBase< Derived > &m) |
AngleAxis | inverse () const |
bool | isApprox (const AngleAxis &other, typename NumTraits< Scalar >::Real prec=precision< Scalar >()) const |
QuaternionType | operator* (const AngleAxis &other) const |
QuaternionType | operator* (const QuaternionType &other) const |
Matrix3 | operator* (const Matrix3 &other) const |
Vector3 | operator* (const Vector3 &other) const |
AngleAxis & | operator= (const QuaternionType &q) |
template<typename Derived > | |
AngleAxis & | operator= (const MatrixBase< Derived > &m) |
Matrix3 | toRotationMatrix (void) const |
![]() | |
const AngleAxis< _Scalar > & | derived () const |
AngleAxis< _Scalar > & | derived () |
Transform< Scalar, Dim > | operator* (const Translation< Scalar, Dim > &t) const |
RotationMatrixType | operator* (const Scaling< Scalar, Dim > &s) const |
Transform< Scalar, Dim > | operator* (const Transform< Scalar, Dim > &t) const |
Protected Attributes | |
Scalar | m_angle |
Vector3 | m_axis |
Friends | |
QuaternionType | operator* (const QuaternionType &a, const AngleAxis &b) |
Matrix3 | operator* (const Matrix3 &a, const AngleAxis &b) |
Represents a 3D rotation as a rotation angle around an arbitrary 3D axis.
This is defined in the Geometry module.
_Scalar | the scalar type, i.e., the type of the coefficients. |
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:
8.67e-08 0 1 0.969 -0.249 -5.36e-09 0.249 0.969 1.13e-07 is unitary: 1
typedef _Scalar Scalar |
the scalar type of the coefficients
|
inline |
Default constructor without initialization.
|
inline |
Constructs and initialize the angle-axis rotation from an angle in radian and an axis which must be normalized.
|
inline |
Constructs and initialize the angle-axis rotation from a quaternion q.
|
inlineexplicit |
Constructs and initialize the angle-axis rotation from a 3x3 rotation matrix.
Copy constructor with scalar type conversion
*this
with scalar type casted to NewScalarType Note that if NewScalarType is equal to the current scalar type of *this
then this function smartly returns a const reference to *this
.
|
inline |
Reimplemented from RotationBase< AngleAxis< _Scalar >, 3 >.
|
inline |
true
if *this
is approximately equal to other, within the precision determined by prec.
|
inline |
Concatenates two rotations
|
inline |
Concatenates two rotations
AngleAxis< Scalar > & operator= | ( | const QuaternionType & | q | ) |
Set *this
from a quaternion. The axis is normalized.
AngleAxis< Scalar > & operator= | ( | const MatrixBase< Derived > & | mat | ) |
Set *this
from a 3x3 rotation matrix mat.
Constructs and
Reimplemented from RotationBase< AngleAxis< _Scalar >, 3 >.
|
friend |
Concatenates two rotations
Concatenates two rotations