59 x.
arr_.setConstant(std::numeric_limits<T>::quiet_NaN());
79 q.
arr_ <<
m(0, 0),
m(1, 0);
92 if (
d < (
T)0.99999999 &&
d > (
T)-0.99999999)
96 else if (
d < (
T)-0.99999999)
169 inline const T&
w()
const
177 inline const T&
x()
const
305 template<
typename Tout = T,
typename T2>
317 template<
typename Tout = T,
typename T2>
327 template<
typename Tout = T,
typename T2>
346 template<
typename T2>
355 template<
typename T2>
403 template<
typename Tout = T,
typename T2>
407 out <<
w() *
v.x() -
x() *
v.y(),
w() *
v.y() +
x() *
v.x();
418 out <<
w() *
v.x() -
x() *
v.y(),
w() *
v.y() +
x() *
v.x();
442 template<
typename T2>
507 template<
typename T2>
550 os <<
"SO(2): [ " << q.
w() <<
", " << q.
x() <<
"i ]";
SO2< T > operator*(const double &l, const SO2< T > &r)
Scale a rotation by a scalar.
Definition SO2.h:523
std::ostream & operator<<(std::ostream &os, const SO2< T > &q)
Render the rotation in a stream.
Definition SO2.h:548
SO2< double > SO2d
Definition SO2.h:554
Class representing a member of the manifold, or a 2D rotation.
Definition SO2.h:14
const Vec2T elements() const
Access all elements of .
Definition SO2.h:201
T & x()
Access the imaginary element of the rotation.
Definition SO2.h:193
SO2 operator+(const Vec1T &v) const
Invocation of oplus via addition.
Definition SO2.h:425
static SO2 identity()
Obtain an identity rotation.
Definition SO2.h:46
SO2 operator*(const SO2< T2 > &q) const
Invocation of otimes via multiplication.
Definition SO2.h:347
static Vec1T vee(const Mat2T &Omega)
Vee operator implementation, which coverts the Lie algebra representation to a tangent-space vector r...
Definition SO2.h:463
static SO2 fromAngle(const T angle)
Convert an angle (in radians) into a rotation.
Definition SO2.h:66
static SO2 fromComplex(const Vec2T &qvec)
Construct a rotation from a rotation fields vector.
Definition SO2.h:124
static SO2 Exp(const Vec1T &omega)
Exponential chart map implementation: .
Definition SO2.h:499
static SO2 random()
Obtain a random rotation.
Definition SO2.h:35
EIGEN_MAKE_ALIGNED_OPERATOR_NEW Map< Vec2T > arr_
Memory-mapped array representing all rotation fields in .
Definition SO2.h:27
SO2 & operator*=(const double &s)
Scale a rotation by a scalar.
Definition SO2.h:368
SO2()
Create a rotation (with garbage data).
Definition SO2.h:134
T * data()
Access pointer to all elements of .
Definition SO2.h:217
Matrix< Tout, 2, 1 > operator*(const Matrix< T2, 2, 1 > &v) const
Transform a vector via multiplication: .
Definition SO2.h:404
static Mat2T log(const SO2 &q)
Logarithmic chart map implementation: .
Definition SO2.h:473
Vec2T array() const
Access all elements of .
Definition SO2.h:209
SO2(const Ref< const Vec2T > &arr)
Create a transform from an array representing all rotation fields in .
Definition SO2.h:139
SO2(const T *data)
Create a rotation from a pointer array representing all rotation fields in .
Definition SO2.h:156
SO2 copy() const
Get a deep copy of the current rotation.
Definition SO2.h:233
SO2< T2 > cast() const
Cast the underlying numeric type.
Definition SO2.h:508
SO2(const SO2 &q)
Copy constructor from another rotation.
Definition SO2.h:147
SO2 operator/(const double &s) const
Scale a rotation by a scalar.
Definition SO2.h:392
SO2 & operator=(const SO2 &q)
Copy constructor.
Definition SO2.h:337
const T * data() const
Access pointer to all elements of .
Definition SO2.h:225
SO2 inverse() const
Obtain the inverse rotation .
Definition SO2.h:274
const T & x() const
Access the imaginary element of the rotation.
Definition SO2.h:177
SO2< Tout > otimes(const SO2< T2 > &q) const
Implementation of group composition: .
Definition SO2.h:306
T & operator[](int i)
Access a field from .
Definition SO2.h:161
static Vec1T Log(const SO2 &q)
Logarithmic chart map implementation: .
Definition SO2.h:481
const T & w() const
Access the real element of the rotation.
Definition SO2.h:169
void normalize()
Normalize the elements of to make it a valid rotation.
Definition SO2.h:243
SO2< Tout > oplus(const Matrix< T2, 1, 1 > &delta) const
Implementation of tangent space group perturbations: .
Definition SO2.h:318
T & w()
Access the real element of the rotation.
Definition SO2.h:185
SO2 & operator*=(const SO2< T2 > &q)
Invocation of otimes via multiplication.
Definition SO2.h:356
Mat2T R() const
Convert the rotation to matrix representation .
Definition SO2.h:262
static SO2 exp(const Mat2T &Omega)
Exponential chart map implementation: .
Definition SO2.h:491
static SO2 nans()
Obtain a rotation full of NaNs.
Definition SO2.h:56
SO2 & invert()
Invert the current rotation .
Definition SO2.h:285
SO2 & operator+=(const Vec1T &v)
Invocation of oplus via addition.
Definition SO2.h:433
static Mat2T hat(const Vec1T &omega)
Hat operator implementation, which coverts the tangent-space vector representation to the correspondi...
Definition SO2.h:452
SO2 normalized()
Obtain a normalized copy of the current rotation.
Definition SO2.h:251
Vec2T operator*(const Vec2T &v) const
Transform a vector via multiplication: .
Definition SO2.h:415
Vec1T operator-(const SO2< T2 > &q) const
Invocation of ominus via subtraction.
Definition SO2.h:443
static SO2 fromTwoUnitVectors(const Vec2T &u, const Vec2T &v)
Given two unit vectors , returns the rotation that rotates .
Definition SO2.h:87
static SO2 fromR(const Mat2T &m)
Convert a rotation matrix to a rotation.
Definition SO2.h:76
T angle() const
Obtain the equivalent scalar angle of the rotation.
Definition SO2.h:296
Matrix< Tout, 1, 1 > ominus(const SO2< T2 > &q) const
Implementation of group subtraction: .
Definition SO2.h:328
SO2 & operator/=(const double &s)
Scale a rotation by a scalar.
Definition SO2.h:380
static SO2 fromComplex(const T qw, const T qx)
Construct a rotation from the individual fields.
Definition SO2.h:113