35 template<
typename _Scalar>
42 using Base::operator*;
60 inline Scalar
angle()
const {
return m_angle; }
63 inline Scalar&
angle() {
return m_angle; }
70 {
return m_angle + other.m_angle; }
74 {
return m_angle += other.m_angle;
return *
this; }
78 {
return toRotationMatrix() * vec; }
80 template<
typename Derived>
82 Matrix2 toRotationMatrix(
void)
const;
88 {
return m_angle * (1-t) + other.
angle() * t; }
95 template<
typename NewScalarType>
100 template<
typename OtherScalarType>
111 {
return ei_isApprox(m_angle,other.m_angle, prec); }
125 template<
typename Scalar>
126 template<
typename Derived>
129 EIGEN_STATIC_ASSERT(Derived::RowsAtCompileTime==2 && Derived::ColsAtCompileTime==2,YOU_MADE_A_PROGRAMMING_MISTAKE)
130 m_angle = ei_atan2(mat.coeff(1,0), mat.coeff(0,0));
136 template<
typename Scalar>
140 Scalar sinA = ei_sin(m_angle);
141 Scalar cosA = ei_cos(m_angle);
142 return (Matrix2() << cosA, -sinA, sinA, cosA).finished();
Definition: gtest_unittest.cc:5031
Definition: XprHelper.h:393
Rotation2D(Scalar a)
Construct a 2D counter clock wise rotation from the angle a in radian.
Definition: Rotation2D.h:57
Rotation2D slerp(Scalar t, const Rotation2D &other) const
Definition: Rotation2D.h:87
bool isApprox(const Rotation2D &other, typename NumTraits< Scalar >::Real prec=precision< Scalar >()) const
Definition: Rotation2D.h:110
iterative scaling algorithm to equilibrate rows and column norms in matrices
Definition: TestIMU_Common.h:87
Rotation2D(const Rotation2D< OtherScalarType > &other)
Copy constructor with scalar type conversion.
Definition: Rotation2D.h:101
Holds information about the various numeric (i.e.
Definition: NumTraits.h:88
const internal::permut_matrix_product_retval< PermutationDerived, Derived, OnTheRight > operator*(const MatrixBase< Derived > &matrix, const PermutationBase< PermutationDerived > &permutation)
Definition: PermutationMatrix.h:539
internal::cast_return_type< Rotation2D, Rotation2D< NewScalarType > >::type cast() const
Definition: Rotation2D.h:96
Common base class for compact rotation representations.
Definition: ForwardDeclarations.h:231
Rotation2D & operator*=(const Rotation2D &other)
Concatenates two rotations.
Definition: Rotation2D.h:73
Definition: ForwardDeclarations.h:234
Rotation2D inverse() const
Definition: Rotation2D.h:66
_Scalar Scalar
the scalar type of the coefficients
Definition: Rotation2D.h:46
Rotation2D< float > Rotation2Df
single precision 2D rotation type
Definition: Rotation2D.h:116
Rotation2D operator*(const Rotation2D &other) const
Concatenates two rotations.
Definition: Rotation2D.h:69
The matrix class, also used for vectors and row-vectors.
Definition: Matrix.h:127
Scalar & angle()
Definition: Rotation2D.h:63
Base class for all dense matrices, vectors, and expressions.
Definition: MatrixBase.h:48
Matrix2 toRotationMatrix(void) const
Constructs and.
Definition: Rotation2D.h:138
double Scalar
Common scalar type.
Definition: FlexibleKalmanBase.h:48
Rotation2D< double > Rotation2Dd
double precision 2D rotation type
Definition: Rotation2D.h:119
Scalar angle() const
Definition: Rotation2D.h:60