10 #ifndef EIGEN_ROTATION2D_H 11 #define EIGEN_ROTATION2D_H 40 template<
typename _Scalar>
47 using Base::operator*;
71 template<
typename Derived>
74 fromRotationMatrix(m.derived());
106 { m_angle += other.
m_angle;
return *
this; }
112 template<
typename Derived>
123 template<
typename Derived>
125 {
return fromRotationMatrix(m.derived()); }
141 template<
typename NewScalarType>
146 template<
typename OtherScalarType>
174 template<
typename Scalar>
175 template<
typename Derived>
179 EIGEN_STATIC_ASSERT(Derived::RowsAtCompileTime==2 && Derived::ColsAtCompileTime==2,YOU_MADE_A_PROGRAMMING_MISTAKE)
180 m_angle =
atan2(mat.coeff(1,0), mat.coeff(0,0));
186 template<
typename Scalar>
192 Scalar sinA =
sin(m_angle);
193 Scalar cosA =
cos(m_angle);
194 return (Matrix2() << cosA, -sinA, sinA, cosA).finished();
199 #endif // EIGEN_ROTATION2D_H
static EIGEN_DEVICE_FUNC Rotation2D Identity()
Jet< T, N > cos(const Jet< T, N > &f)
EIGEN_DEVICE_FUNC Rotation2D slerp(const Scalar &t, const Rotation2D &other) const
Jet< T, N > sin(const Jet< T, N > &f)
Namespace containing all symbols from the Eigen library.
RotationBase< Rotation2D< _Scalar >, 2 > Base
Holds information about the various numeric (i.e. scalar) types allowed by Eigen. ...
#define EIGEN_STATIC_ASSERT(CONDITION, MSG)
EIGEN_DEVICE_FUNC Rotation2D(const Rotation2D< OtherScalarType > &other)
EIGEN_DEVICE_FUNC Matrix2 toRotationMatrix() const
EIGEN_DEVICE_FUNC internal::cast_return_type< Rotation2D, Rotation2D< NewScalarType > >::type cast() const
EIGEN_DEVICE_FUNC Scalar smallestPositiveAngle() const
EIGEN_DEVICE_FUNC Rotation2D operator*(const Rotation2D &other) const
static EIGEN_DEVICE_FUNC Matrix< Scalar, 2, 2 > toRotationMatrix(const Scalar &s)
EIGEN_DEVICE_FUNC Rotation2D inverse() const
EIGEN_DEVICE_FUNC Rotation2D(const MatrixBase< Derived > &m)
Common base class for compact rotation representations.
EIGEN_DEVICE_FUNC Rotation2D(const Scalar &a)
static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorUInt128< uint64_t, uint64_t > operator*(const TensorUInt128< HL, LL > &lhs, const TensorUInt128< HR, LR > &rhs)
EIGEN_DEVICE_FUNC Rotation2D & operator*=(const Rotation2D &other)
#define EIGEN_DEVICE_FUNC
EIGEN_DEVICE_FUNC Rotation2D & fromRotationMatrix(const MatrixBase< Derived > &m)
Matrix< Scalar, 2, 2 > Matrix2
Represents a rotation/orientation in a 2 dimensional space.
EIGEN_DEVICE_FUNC Rotation2D & operator=(const MatrixBase< Derived > &m)
#define EIGEN_USING_STD(FUNC)
EIGEN_DEVICE_FUNC Scalar & angle()
const AutoDiffScalar< Matrix< typename internal::traits< typename internal::remove_all< DerTypeA >::type >::Scalar, Dynamic, 1 > > atan2(const AutoDiffScalar< DerTypeA > &a, const AutoDiffScalar< DerTypeB > &b)
Rotation2D< double > Rotation2Dd
Matrix< Scalar, 2, 1 > Vector2
The matrix class, also used for vectors and row-vectors.
Rotation2D< float > Rotation2Df
EIGEN_DEVICE_FUNC bool isApprox(const Scalar &x, const Scalar &y, const typename NumTraits< Scalar >::Real &precision=NumTraits< Scalar >::dummy_precision())
EIGEN_DEVICE_FUNC bool isApprox(const Rotation2D &other, const typename NumTraits< Scalar >::Real &prec=NumTraits< Scalar >::dummy_precision()) const
EIGEN_DEVICE_FUNC Scalar angle() const
EIGEN_DEVICE_FUNC Rotation2D()
Base class for all dense matrices, vectors, and expressions.
EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE T fmod(const T &a, const T &b)
EIGEN_DEVICE_FUNC Scalar smallestAngle() const