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; }
80 template<
typename Derived>
88 {
return m_angle * (1-t) + other.
angle() * t; }
95 template<
typename NewScalarType>
100 template<
typename OtherScalarType>
103 m_angle = Scalar(other.
angle());
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();
internal::cast_return_type< Rotation2D, Rotation2D< NewScalarType > >::type cast() const
static Matrix< Scalar, 2, 2 > toRotationMatrix(const Scalar &s)
Rotation2D & fromRotationMatrix(const MatrixBase< Derived > &m)
iterative scaling algorithm to equilibrate rows and column norms in matrices
RotationBase< Rotation2D< _Scalar >, 2 > Base
Rotation2D(const Rotation2D< OtherScalarType > &other)
Holds information about the various numeric (i.e. scalar) types allowed by Eigen. ...
const internal::permut_matrix_product_retval< PermutationDerived, Derived, OnTheRight > operator*(const MatrixBase< Derived > &matrix, const PermutationBase< PermutationDerived > &permutation)
#define EIGEN_STATIC_ASSERT(CONDITION, MSG)
Common base class for compact rotation representations.
Rotation2D operator*(const Rotation2D &other) const
Matrix2 toRotationMatrix(void) const
Rotation2D inverse() const
Matrix< Scalar, 2, 2 > Matrix2
Rotation2D & operator*=(const Rotation2D &other)
Represents a rotation/orientation in a 2 dimensional space.
bool ei_isApprox(const Scalar &x, const Scalar &y, typename NumTraits< Scalar >::Real precision=NumTraits< Scalar >::dummy_precision())
T ei_atan2(const T &x, const T &y)
Matrix< Scalar, 2, 1 > Vector2
Rotation2D< float > Rotation2Df
The matrix class, also used for vectors and row-vectors.
bool isApprox(const Rotation2D &other, typename NumTraits< Scalar >::Real prec=precision< Scalar >()) const
Base class for all dense matrices, vectors, and expressions.
Rotation2D slerp(Scalar t, const Rotation2D &other) const
Rotation2D< double > Rotation2Dd