Represents a rotation/orientation in a 2 dimensional space. More...
Public Types | |
enum | { Dim } |
typedef Matrix< Scalar, 2, 2 > | Matrix2 |
typedef Scalar_ | Scalar |
typedef Matrix< Scalar, 2, 1 > | Vector2 |
Public Types inherited from Eigen::RotationBase< Rotation2D< Scalar_ >, 2 > | |
enum | |
typedef Matrix< Scalar, Dim, Dim > | RotationMatrixType |
typedef internal::traits< Rotation2D< Scalar_ > >::Scalar | Scalar |
typedef Matrix< Scalar, Dim, 1 > | VectorType |
Public Member Functions | |
Scalar & | angle () |
Scalar | angle () const |
template<typename NewScalarType > | |
internal::cast_return_type< Rotation2D, Rotation2D< NewScalarType > >::type | cast () const |
template<typename Derived > | |
Rotation2D & | fromRotationMatrix (const MatrixBase< Derived > &m) |
template<typename Derived > | |
Rotation2D< Scalar > & | fromRotationMatrix (const MatrixBase< Derived > &mat) |
Rotation2D | inverse () const |
bool | isApprox (const Rotation2D &other, const typename NumTraits< Scalar >::Real &prec=NumTraits< Scalar >::dummy_precision()) const |
Rotation2D | operator* (const Rotation2D &other) const |
Vector2 | operator* (const Vector2 &vec) const |
Rotation2D & | operator*= (const Rotation2D &other) |
template<typename Derived > | |
Rotation2D & | operator= (const MatrixBase< Derived > &m) |
Rotation2D () | |
template<typename Derived > | |
Rotation2D (const MatrixBase< Derived > &m) | |
template<typename OtherScalarType > | |
Rotation2D (const Rotation2D< OtherScalarType > &other) | |
Rotation2D (const Scalar &a) | |
Rotation2D | slerp (const Scalar &t, const Rotation2D &other) const |
Scalar | smallestAngle () const |
Scalar | smallestPositiveAngle () const |
Matrix2 | toRotationMatrix () const |
Public Member Functions inherited from Eigen::RotationBase< Rotation2D< Scalar_ >, 2 > | |
VectorType | _transformVector (const OtherVectorType &v) const |
Rotation2D< Scalar_ > & | derived () |
const Rotation2D< Scalar_ > & | derived () const |
Rotation2D< Scalar_ > | inverse () const |
RotationMatrixType | matrix () const |
internal::rotation_base_generic_product_selector< Rotation2D< Scalar_ >, OtherDerived, OtherDerived::IsVectorAtCompileTime >::ReturnType | operator* (const EigenBase< OtherDerived > &e) const |
Transform< Scalar, Dim, Mode > | operator* (const Transform< Scalar, Dim, Mode, Options > &t) const |
Transform< Scalar, Dim, Isometry > | operator* (const Translation< Scalar, Dim > &t) const |
RotationMatrixType | operator* (const UniformScaling< Scalar > &s) const |
RotationMatrixType | toRotationMatrix () const |
Static Public Member Functions | |
static Rotation2D | Identity () |
Protected Attributes | |
Scalar | m_angle |
Private Types | |
typedef RotationBase< Rotation2D< Scalar_ >, 2 > | Base |
Represents a rotation/orientation in a 2 dimensional space.
This is defined in the Geometry module.
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 43 of file Rotation2D.h.
|
private |
Definition at line 45 of file Rotation2D.h.
typedef Matrix<Scalar,2,2> Eigen::Rotation2D< Scalar_ >::Matrix2 |
Definition at line 55 of file Rotation2D.h.
typedef Scalar_ Eigen::Rotation2D< Scalar_ >::Scalar |
the scalar type of the coefficients
Definition at line 53 of file Rotation2D.h.
typedef Matrix<Scalar,2,1> Eigen::Rotation2D< Scalar_ >::Vector2 |
Definition at line 54 of file Rotation2D.h.
anonymous enum |
|
inlineexplicit |
Construct a 2D counter clock wise rotation from the angle a in radian.
Definition at line 64 of file Rotation2D.h.
|
inline |
Default constructor wihtout initialization. The represented rotation is undefined.
Definition at line 67 of file Rotation2D.h.
|
inlineexplicit |
Construct a 2D rotation from a 2x2 rotation matrix mat.
Definition at line 74 of file Rotation2D.h.
|
inlineexplicit |
|
inline |
|
inline |
|
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 144 of file Rotation2D.h.
Rotation2D& Eigen::Rotation2D< Scalar_ >::fromRotationMatrix | ( | const MatrixBase< Derived > & | m | ) |
Rotation2D<Scalar>& Eigen::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 178 of file Rotation2D.h.
|
inlinestatic |
Definition at line 154 of file Rotation2D.h.
|
inline |
|
inline |
true
if *this
is approximately equal to other, within the precision determined by prec.Definition at line 160 of file Rotation2D.h.
|
inline |
|
inline |
|
inline |
|
inline |
Set *this
from a 2x2 rotation matrix mat. In other words, this function extract the rotation angle from the rotation matrix.
This method is an alias for fromRotationMatrix()
Definition at line 126 of file Rotation2D.h.
|
inline |
*this
and other using parameter t. It is in fact equivalent to a linear interpolation. Definition at line 132 of file Rotation2D.h.
|
inline |
Definition at line 92 of file Rotation2D.h.
|
inline |
Definition at line 86 of file Rotation2D.h.
Rotation2D< Scalar >::Matrix2 Eigen::Rotation2D< Scalar >::toRotationMatrix | ( | void | ) | const |
Constructs and
Definition at line 190 of file Rotation2D.h.
|
protected |
Definition at line 59 of file Rotation2D.h.