Represents a rotation/orientation in a 2 dimensional space.
| _Scalar | the scalar type, i.e., the type of the coefficients |
This class is equivalent to a single scalar representing a counter clock wise rotation as a single angle in radian. It provides some additional features such as the automatic conversion from/to a 2x2 rotation matrix. Moreover this class aims to provide a similar interface to Quaternion in order to facilitate the writing of generic algorithms dealing with rotations.
Definition at line 54 of file Rotation2D.h.
#include <src/Geometry/Rotation2D.h>

Public Types | |
| enum | { Dim = 2 } |
| typedef _Scalar | Scalar |
| the scalar type of the coefficients | |
| typedef Matrix< Scalar, 2, 1 > | Vector2 |
| typedef Matrix< Scalar, 2, 2 > | Matrix2 |
Public Member Functions | |
| Rotation2D (Scalar a) | |
| Construct a 2D counter clock wise rotation from the angle a in radian. | |
| Scalar | angle () const |
| Scalar & | angle () |
| Rotation2D | inverse () const |
| Rotation2D | operator* (const Rotation2D &other) const |
| Concatenates two rotations. | |
| Rotation2D & | operator*= (const Rotation2D &other) |
| Concatenates two rotations. | |
| Vector2 | operator* (const Vector2 &vec) const |
| Applies the rotation to a 2D vector. | |
| template<typename Derived > | |
| Rotation2D & | fromRotationMatrix (const MatrixBase< Derived > &m) |
Set *this from a 2x2 rotation matrix mat. | |
| Matrix2 | toRotationMatrix (void) const |
| Constructs and. | |
| Rotation2D | slerp (Scalar t, const Rotation2D &other) const |
| template<typename NewScalarType > | |
| internal::cast_return_type < Rotation2D, Rotation2D < NewScalarType > >::type | cast () const |
| template<typename OtherScalarType > | |
| Rotation2D (const Rotation2D< OtherScalarType > &other) | |
| Copy constructor with scalar type conversion. | |
| bool | isApprox (const Rotation2D &other, typename NumTraits< Scalar >::Real prec=NumTraits< Scalar >::dummy_precision()) const |
Static Public Member Functions | |
| static Rotation2D | Identity () |
Protected Attributes | |
| Scalar | m_angle |
Private Types | |
| typedef RotationBase < Rotation2D< _Scalar >, 2 > | Base |
typedef RotationBase<Rotation2D<_Scalar>,2> Rotation2D< _Scalar >::Base [private] |
Definition at line 56 of file Rotation2D.h.
| typedef Matrix<Scalar,2,2> Rotation2D< _Scalar >::Matrix2 |
Definition at line 66 of file Rotation2D.h.
| typedef _Scalar Rotation2D< _Scalar >::Scalar |
the scalar type of the coefficients
Reimplemented from RotationBase< Rotation2D< _Scalar >, 2 >.
Definition at line 64 of file Rotation2D.h.
| typedef Matrix<Scalar,2,1> Rotation2D< _Scalar >::Vector2 |
Definition at line 65 of file Rotation2D.h.
| anonymous enum |
Definition at line 62 of file Rotation2D.h.
| Rotation2D< _Scalar >::Rotation2D | ( | Scalar | a ) | [inline] |
Construct a 2D counter clock wise rotation from the angle a in radian.
Definition at line 75 of file Rotation2D.h.
Referenced by Rotation2D< _Scalar >::Identity().
| Rotation2D< _Scalar >::Rotation2D | ( | const Rotation2D< OtherScalarType > & | other ) | [inline, explicit] |
Copy constructor with scalar type conversion.
Definition at line 119 of file Rotation2D.h.
References Rotation2D< _Scalar >::angle(), and Rotation2D< _Scalar >::m_angle.
| Scalar Rotation2D< _Scalar >::angle | ( | ) | const [inline] |
Definition at line 78 of file Rotation2D.h.
References Rotation2D< _Scalar >::m_angle.
Referenced by Rotation2D< _Scalar >::Rotation2D(), and Rotation2D< _Scalar >::slerp().
| Scalar& Rotation2D< _Scalar >::angle | ( | ) | [inline] |
Definition at line 81 of file Rotation2D.h.
References Rotation2D< _Scalar >::m_angle.
| internal::cast_return_type<Rotation2D,Rotation2D<NewScalarType> >::type Rotation2D< _Scalar >::cast | ( | ) | const [inline] |
*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.
Definition at line 114 of file Rotation2D.h.
| Rotation2D< Scalar > & Rotation2D< Scalar >::fromRotationMatrix | ( | const MatrixBase< Derived > & | mat ) |
Set *this from a 2x2 rotation matrix mat.
In other words, this function extract the rotation angle from the rotation matrix.
Definition at line 147 of file Rotation2D.h.
References EIGEN_STATIC_ASSERT.
| static Rotation2D Rotation2D< _Scalar >::Identity | ( | ) | [inline, static] |
Definition at line 124 of file Rotation2D.h.
References Rotation2D< _Scalar >::Rotation2D().
| Rotation2D Rotation2D< _Scalar >::inverse | ( | ) | const [inline] |
Reimplemented from RotationBase< Rotation2D< _Scalar >, 2 >.
Definition at line 84 of file Rotation2D.h.
References Rotation2D< _Scalar >::m_angle.
| bool Rotation2D< _Scalar >::isApprox | ( | const Rotation2D< _Scalar > & | other, |
| typename NumTraits< Scalar >::Real | prec = NumTraits<Scalar>::dummy_precision() |
||
| ) | const [inline] |
true if *this is approximately equal to other, within the precision determined by prec.Definition at line 130 of file Rotation2D.h.
References Rotation2D< _Scalar >::m_angle.
| Rotation2D Rotation2D< _Scalar >::operator* | ( | const Rotation2D< _Scalar > & | other ) | const [inline] |
Concatenates two rotations.
Definition at line 87 of file Rotation2D.h.
References Rotation2D< _Scalar >::m_angle.
| Vector2 Rotation2D< _Scalar >::operator* | ( | const Vector2 & | vec ) | const [inline] |
Applies the rotation to a 2D vector.
Definition at line 95 of file Rotation2D.h.
References Rotation2D< _Scalar >::toRotationMatrix().
| Rotation2D& Rotation2D< _Scalar >::operator*= | ( | const Rotation2D< _Scalar > & | other ) | [inline] |
Concatenates two rotations.
Definition at line 91 of file Rotation2D.h.
References Rotation2D< _Scalar >::m_angle.
| Rotation2D Rotation2D< _Scalar >::slerp | ( | Scalar | t, |
| const Rotation2D< _Scalar > & | other | ||
| ) | const [inline] |
*this and other using parameter t. It is in fact equivalent to a linear interpolation. Definition at line 105 of file Rotation2D.h.
References Rotation2D< _Scalar >::angle(), Rotation2D< _Scalar >::m_angle, and t().
| Rotation2D< Scalar >::Matrix2 Rotation2D< Scalar >::toRotationMatrix | ( | void | ) | const |
Constructs and.
Reimplemented from RotationBase< Rotation2D< _Scalar >, 2 >.
Definition at line 158 of file Rotation2D.h.
Referenced by Rotation2D< _Scalar >::operator*().
Scalar Rotation2D< _Scalar >::m_angle [protected] |
Definition at line 70 of file Rotation2D.h.
Referenced by Rotation2D< _Scalar >::angle(), Rotation2D< _Scalar >::inverse(), Rotation2D< _Scalar >::isApprox(), Rotation2D< _Scalar >::operator*(), Rotation2D< _Scalar >::operator*=(), Rotation2D< _Scalar >::Rotation2D(), and Rotation2D< _Scalar >::slerp().
| Page generated by Doxygen 1.7.2 for MRPT 0.9.4 SVN: at Mon Jan 10 22:30:30 UTC 2011 |