OSVR-Core
Public Types | Public Member Functions | Static Public Member Functions | Protected Attributes | List of all members
Eigen::Rotation2D< _Scalar > Class Template Reference

More...

#include <Rotation2D.h>

Inheritance diagram for Eigen::Rotation2D< _Scalar >:
Eigen::RotationBase< Rotation2D< _Scalar >, 2 > Eigen::RotationBase< Rotation2D< _Scalar >, 2 >

Public Types

enum  { Dim = 2 }
 
enum  { Dim = 2 }
 
typedef _Scalar Scalar
 the scalar type of the coefficients
 
typedef Matrix< Scalar, 2, 1 > Vector2
 
typedef Matrix< Scalar, 2, 2 > Matrix2
 
typedef _Scalar Scalar
 the scalar type of the coefficients
 
typedef Matrix< Scalar, 2, 1 > Vector2
 
typedef Matrix< Scalar, 2, 2 > Matrix2
 
- Public Types inherited from Eigen::RotationBase< Rotation2D< _Scalar >, 2 >
enum  
 
enum  
 
typedef ei_traits< Rotation2D< _Scalar > >::Scalar Scalar
 the scalar type of the coefficients
 
typedef internal::traits< Rotation2D< _Scalar > >::Scalar Scalar
 the scalar type of the coefficients
 
typedef Matrix< Scalar, Dim, Dim > RotationMatrixType
 corresponding linear transformation matrix type
 
typedef Matrix< Scalar, Dim, Dim > RotationMatrixType
 corresponding linear transformation matrix type
 
typedef Matrix< Scalar, Dim, 1 > VectorType
 

Public Member Functions

 Rotation2D (Scalar a)
 Construct a 2D counter clock wise rotation from the angle a in radian. More...
 
Scalar angle () const
 
Scalarangle ()
 
Rotation2D inverse () const
 
Rotation2D operator* (const Rotation2D &other) const
 Concatenates two rotations.
 
Rotation2Doperator*= (const Rotation2D &other)
 Concatenates two rotations.
 
Vector2 operator* (const Vector2 &vec) const
 Applies the rotation to a 2D vector.
 
template<typename Derived >
Rotation2DfromRotationMatrix (const MatrixBase< Derived > &m)
 
Matrix2 toRotationMatrix (void) const
 Constructs and. More...
 
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=precision< Scalar >()) const
 
 Rotation2D (const Scalar &a)
 Construct a 2D counter clock wise rotation from the angle a in radian. More...
 
 Rotation2D ()
 Default constructor wihtout initialization. More...
 
Scalar angle () const
 
Scalarangle ()
 
Rotation2D inverse () const
 
Rotation2D operator* (const Rotation2D &other) const
 Concatenates two rotations.
 
Rotation2Doperator*= (const Rotation2D &other)
 Concatenates two rotations.
 
Vector2 operator* (const Vector2 &vec) const
 Applies the rotation to a 2D vector.
 
template<typename Derived >
Rotation2DfromRotationMatrix (const MatrixBase< Derived > &m)
 
Matrix2 toRotationMatrix () const
 
Rotation2D slerp (const 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, const typename NumTraits< Scalar >::Real &prec=NumTraits< Scalar >::dummy_precision()) const
 
template<typename Derived >
Rotation2D< Scalar > & fromRotationMatrix (const MatrixBase< Derived > &mat)
 Set *this from a 2x2 rotation matrix mat. More...
 
- Public Member Functions inherited from Eigen::RotationBase< Rotation2D< _Scalar >, 2 >
const Rotation2D< _Scalar > & derived () const
 
Rotation2D< _Scalar > & derived ()
 
const Rotation2D< _Scalar > & derived () const
 
Rotation2D< _Scalar > & derived ()
 
RotationMatrixType toRotationMatrix () const
 
RotationMatrixType toRotationMatrix () const
 
Rotation2D< _Scalar > inverse () const
 
Rotation2D< _Scalar > inverse () const
 
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
 
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< 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
 
RotationMatrixType matrix () const
 
VectorType _transformVector (const OtherVectorType &v) const
 

Static Public Member Functions

static Rotation2D Identity ()
 

Protected Attributes

Scalar m_angle
 

Detailed Description

template<typename _Scalar>
class Eigen::Rotation2D< _Scalar >

Represents a rotation/orientation in a 2 dimensional space.

Parameters
_Scalarthe 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.

See also
class Quaternion, class Transform

Constructor & Destructor Documentation

§ Rotation2D() [1/3]

template<typename _Scalar>
Eigen::Rotation2D< _Scalar >::Rotation2D ( Scalar  a)
inline

Construct a 2D counter clock wise rotation from the angle a in radian.

§ Rotation2D() [2/3]

template<typename _Scalar>
Eigen::Rotation2D< _Scalar >::Rotation2D ( const Scalar a)
inline

Construct a 2D counter clock wise rotation from the angle a in radian.

§ Rotation2D() [3/3]

template<typename _Scalar>
Eigen::Rotation2D< _Scalar >::Rotation2D ( )
inline

Default constructor wihtout initialization.

The represented rotation is undefined.

Member Function Documentation

§ angle() [1/4]

template<typename _Scalar>
Scalar Eigen::Rotation2D< _Scalar >::angle ( ) const
inline
Returns
the rotation angle

§ angle() [2/4]

template<typename _Scalar>
Scalar& Eigen::Rotation2D< _Scalar >::angle ( )
inline
Returns
a read-write reference to the rotation angle

§ angle() [3/4]

template<typename _Scalar>
Scalar Eigen::Rotation2D< _Scalar >::angle ( ) const
inline
Returns
the rotation angle

§ angle() [4/4]

template<typename _Scalar>
Scalar& Eigen::Rotation2D< _Scalar >::angle ( )
inline
Returns
a read-write reference to the rotation angle

§ cast() [1/2]

template<typename _Scalar>
template<typename NewScalarType >
internal::cast_return_type<Rotation2D,Rotation2D<NewScalarType> >::type Eigen::Rotation2D< _Scalar >::cast ( ) const
inline
Returns
*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.

§ cast() [2/2]

template<typename _Scalar>
template<typename NewScalarType >
internal::cast_return_type<Rotation2D,Rotation2D<NewScalarType> >::type Eigen::Rotation2D< _Scalar >::cast ( ) const
inline
Returns
*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.

§ fromRotationMatrix()

template<typename Scalar >
template<typename Derived >
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.

§ inverse() [1/2]

template<typename _Scalar>
Rotation2D Eigen::Rotation2D< _Scalar >::inverse ( void  ) const
inline
Returns
the inverse rotation

§ inverse() [2/2]

template<typename _Scalar>
Rotation2D Eigen::Rotation2D< _Scalar >::inverse ( void  ) const
inline
Returns
the inverse rotation

§ isApprox() [1/2]

template<typename _Scalar>
bool Eigen::Rotation2D< _Scalar >::isApprox ( const Rotation2D< _Scalar > &  other,
typename NumTraits< Scalar >::Real  prec = precision<Scalar>() 
) const
inline
Returns
true if *this is approximately equal to other, within the precision determined by prec.
See also
MatrixBase::isApprox()

§ isApprox() [2/2]

template<typename _Scalar>
bool Eigen::Rotation2D< _Scalar >::isApprox ( const Rotation2D< _Scalar > &  other,
const typename NumTraits< Scalar >::Real &  prec = NumTraits<Scalar>::dummy_precision() 
) const
inline
Returns
true if *this is approximately equal to other, within the precision determined by prec.
See also
MatrixBase::isApprox()

§ slerp() [1/2]

template<typename _Scalar>
Rotation2D Eigen::Rotation2D< _Scalar >::slerp ( Scalar  t,
const Rotation2D< _Scalar > &  other 
) const
inline
Returns
the spherical interpolation between *this and other using parameter t. It is in fact equivalent to a linear interpolation.

§ slerp() [2/2]

template<typename _Scalar>
Rotation2D Eigen::Rotation2D< _Scalar >::slerp ( const Scalar t,
const Rotation2D< _Scalar > &  other 
) const
inline
Returns
the spherical interpolation between *this and other using parameter t. It is in fact equivalent to a linear interpolation.

§ toRotationMatrix()

template<typename Scalar >
Rotation2D< Scalar >::Matrix2 Eigen::Rotation2D< Scalar >::toRotationMatrix ( void  ) const

Constructs and.

Returns
an equivalent 2x2 rotation matrix.

The documentation for this class was generated from the following files: