9#include "detail/c1.hpp"
10#include "detail/macro.hpp"
11#include "lie_group_base.hpp"
12#include "smooth/detail/macro.hpp"
18template<
typename Scalar>
60template<
typename _Derived>
69 SMOOTH_INHERIT_TYPEDEFS;
78 return atan2(
static_cast<const _Derived &
>(*this).coeffs().x(),
static_cast<const _Derived &
>(*this).coeffs().y());
89 static_cast<const _Derived &
>(*this).coeffs().x() *
static_cast<const _Derived &
>(*this).coeffs().x()
90 +
static_cast<const _Derived &
>(*this).coeffs().y() *
static_cast<const _Derived &
>(*this).coeffs().y());
104 std::complex<Scalar>
c1()
const
106 return std::complex<Scalar>(
107 static_cast<const _Derived &
>(*this).coeffs().y(),
static_cast<const _Derived &
>(*this).coeffs().x());
113 template<
typename EigenDerived>
114 Eigen::Matrix<Scalar, 2, 1>
operator*(
const Eigen::MatrixBase<EigenDerived> &
v)
const
121template<
typename _Scalar>
126template<
typename _Scalar>
129 static constexpr bool is_mutable =
true;
131 using Impl = C1Impl<_Scalar>;
134 template<
typename NewScalar>
144template<
typename _Scalar>
148 SMOOTH_GROUP_API(
C1);
159 using std::cos, std::sin;
170 explicit C1(
const std::complex<Scalar> & c)
172 m_coeffs.x() = c.imag();
173 m_coeffs.y() = c.real();
178template<
typename _Scalar>
188template<
typename _Scalar>
197template<
typename _Scalar>
200 static constexpr bool is_mutable =
false;
209template<
typename _Scalar>
214 SMOOTH_CONST_MAP_API();
Base class for C1 Lie group types.
Eigen::Matrix< Scalar, 2, 1 > operator*(const Eigen::MatrixBase< EigenDerived > &v) const
Rotation and scaling action on 2D vector.
SO2< Scalar > so2() const
Rotation.
std::complex< Scalar > c1() const
Complex number representation.
Scalar angle() const
Rotation angle.
Scalar scaling() const
Scaling.
Storage implementation of C1 Lie group.
C1(const std::complex< Scalar > &c)
Construct from complex number.
C1(const Scalar &scaling, const Scalar &angle)
Construct from scaling and angle.
Base class for Lie group types.
typename traits::Scalar Scalar
Scalar type.
Matrix matrix() const noexcept
Return as matrix Lie group element in .
Eigen::Matrix< Scalar, Dim, Dim > Matrix
Lie group matrix type.
Memory mapping of internal Lie group types.
Storage implementation of SO2 Lie group.
typename traits::man< M >::Scalar Scalar
Manifold scalar type.
typename traits::man< M >::PlainObject PlainObject
Manifold default type.
Type trait that maps a type to Lie group operations.