![]() |
Eigen
3.2.91
|
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.
Public Types | |
typedef Matrix< Scalar, Dim, Dim > | RotationMatrixType |
typedef _Scalar | Scalar |
Public Member Functions | |
Scalar | angle () const |
Scalar & | angle () |
template<typename NewScalarType > | |
internal::cast_return_type< Rotation2D, Rotation2D< NewScalarType > >::type | cast () const |
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 |
RotationMatrixType | matrix () const |
Transform< Scalar, Dim, Isometry > | operator* (const Translation< Scalar, Dim > &t) const |
RotationMatrixType | operator* (const UniformScaling< Scalar > &s) 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 |
Rotation2D | operator* (const Rotation2D &other) const |
Vector2 | operator* (const Vector2 &vec) const |
Rotation2D & | operator*= (const Rotation2D &other) |
Rotation2D (const Scalar &a) | |
Rotation2D () | |
template<typename OtherScalarType > | |
Rotation2D (const Rotation2D< OtherScalarType > &other) | |
Rotation2D | slerp (const Scalar &t, const Rotation2D &other) const |
Scalar | smallestAngle () const |
Scalar | smallestPositiveAngle () const |
Matrix2 | toRotationMatrix () const |
|
inherited |
corresponding linear transformation matrix type
typedef _Scalar Eigen::Rotation2D< _Scalar >::Scalar |
the scalar type of the coefficients
|
inlineexplicit |
Construct a 2D counter clock wise rotation from the angle a in radian.
|
inline |
Default constructor wihtout initialization. The represented rotation is undefined.
Referenced by Eigen::Rotation2D< _Scalar >::inverse(), Eigen::Rotation2D< _Scalar >::operator*(), and Eigen::Rotation2D< _Scalar >::slerp().
|
inlineexplicit |
Copy constructor with scalar type conversion
|
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
.
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.
|
inline |
References Eigen::Rotation2D< _Scalar >::Rotation2D().
|
inline |
true
if *this
is approximately equal to other, within the precision determined by prec.
|
inlineinherited |
|
inlineinherited |
*this
with a translation t
|
inlineinherited |
*this
with a uniform scaling s
|
inlineinherited |
*this
with a generic expression e e can be:
|
inlineinherited |
*this
with a transformation t
|
inline |
Concatenates two rotations
References Eigen::Rotation2D< _Scalar >::Rotation2D().
|
inline |
Applies the rotation to a 2D vector
References Eigen::Rotation2D< _Scalar >::toRotationMatrix().
|
inline |
Concatenates two rotations
|
inline |
*this
and other using parameter t. It is in fact equivalent to a linear interpolation. References Eigen::Rotation2D< _Scalar >::Rotation2D().
|
inline |
|
inline |
Rotation2D< Scalar >::Matrix2 Eigen::Rotation2D< Scalar >::toRotationMatrix | ( | void | ) | const |
Constructs and
Referenced by Eigen::Rotation2D< _Scalar >::operator*().