TooN
Classes | Public Member Functions | Static Public Member Functions | Friends | Related Functions | List of all members
TooN::SO2< Precision > Class Template Reference

Class to represent a two-dimensional rotation matrix. More...

#include <so2.h>

Public Member Functions

 SO2 (const Operator< Internal::Identity< Internal::One > > &)
 Default constructor. Initialises the matrix to the identity (no rotation)
 
 SO2 (const Matrix< 2, 2, Precision > &rhs)
 Construct from a rotation matrix.
 
 SO2 (const Precision l)
 Construct from an angle.
 
template<int R, int C, typename P , typename A >
SO2operator= (const Matrix< R, C, P, A > &rhs)
 Assigment operator from a general matrix. More...
 
void coerce ()
 Modifies the matrix to make sure it is a valid rotation matrix.
 
Precision ln () const
 extracts the rotation angle from the SO2
 
SO2 inverse () const
 Returns the inverse of this matrix (=the transpose, so this is a fast operation)
 
template<typename P >
SO2operator*= (const SO2< P > &rhs)
 Self right-multiply by another rotation matrix.
 
template<typename P >
SO2< typename Internal::MultiplyType< Precision, P >::type > operator* (const SO2< P > &rhs) const
 Right-multiply by another rotation matrix.
 
const Matrix< 2, 2, Precision > & get_matrix () const
 Returns the SO2 as a Matrix<2>
 

Static Public Member Functions

static SO2 exp (const Precision &d)
 Exponentiate an angle in the Lie algebra to generate a new SO2.
 
static Matrix< 2, 2, Precision > generator ()
 returns generator matrix
 

Friends

std::istream & operator>> (std::istream &, SO2 &)
 
std::istream & operator>> (std::istream &, SE2< Precision > &)
 
std::istream & operator>> (std::istream &, SIM2< Precision > &)
 

Related Functions

(Note that these are not member functions.)

template<typename Precision >
SE2< Precision > operator* (const SO2< Precision > &lhs, const SE2< Precision > &rhs)
 Multiply a SO2 with and SE2.
 
template<typename Precision >
std::ostream & operator<< (std::ostream &os, const SO2< Precision > &rhs)
 Write an SO2 to a stream. More...
 
template<typename Precision >
std::istream & operator>> (std::istream &is, SO2< Precision > &rhs)
 Read from SO2 to a stream. More...
 
template<int D, typename P1 , typename PV , typename Accessor >
Vector< 2, typename Internal::MultiplyType< P1, PV >::type > operator* (const SO2< P1 > &lhs, const Vector< D, PV, Accessor > &rhs)
 Right-multiply by a Vector. More...
 
template<int D, typename P1 , typename PV , typename Accessor >
Vector< 2, typename Internal::MultiplyType< PV, P1 >::type > operator* (const Vector< D, PV, Accessor > &lhs, const SO2< P1 > &rhs)
 Left-multiply by a Vector. More...
 
template<int R, int C, typename P1 , typename P2 , typename Accessor >
Matrix< 2, C, typename Internal::MultiplyType< P1, P2 >::type > operator* (const SO2< P1 > &lhs, const Matrix< R, C, P2, Accessor > &rhs)
 Right-multiply by a Matrix. More...
 
template<int R, int C, typename P1 , typename P2 , typename Accessor >
Matrix< R, 2, typename Internal::MultiplyType< P1, P2 >::type > operator* (const Matrix< R, C, P1, Accessor > &lhs, const SO2< P2 > &rhs)
 Left-multiply by a Matrix. More...
 

Detailed Description

template<typename Precision = DefaultPrecision>
class TooN::SO2< Precision >

Class to represent a two-dimensional rotation matrix.

Two-dimensional rotation matrices are members of the Special Orthogonal Lie group SO2. This group can be parameterised with one number (the rotation angle).

Member Function Documentation

◆ operator=()

template<typename Precision = DefaultPrecision>
template<int R, int C, typename P , typename A >
SO2& TooN::SO2< Precision >::operator= ( const Matrix< R, C, P, A > &  rhs)
inline

Assigment operator from a general matrix.

This also calls coerce() to make sure that the matrix is a valid rotation matrix.

Friends And Related Function Documentation

◆ operator*() [1/4]

template<int D, typename P1 , typename PV , typename Accessor >
Vector< 2, typename Internal::MultiplyType< P1, PV >::type > operator* ( const SO2< P1 > &  lhs,
const Vector< D, PV, Accessor > &  rhs 
)
related

Right-multiply by a Vector.

◆ operator*() [2/4]

template<int D, typename P1 , typename PV , typename Accessor >
Vector< 2, typename Internal::MultiplyType< PV, P1 >::type > operator* ( const Vector< D, PV, Accessor > &  lhs,
const SO2< P1 > &  rhs 
)
related

Left-multiply by a Vector.

◆ operator*() [3/4]

template<int R, int C, typename P1 , typename P2 , typename Accessor >
Matrix< 2, C, typename Internal::MultiplyType< P1, P2 >::type > operator* ( const SO2< P1 > &  lhs,
const Matrix< R, C, P2, Accessor > &  rhs 
)
related

Right-multiply by a Matrix.

◆ operator*() [4/4]

template<int R, int C, typename P1 , typename P2 , typename Accessor >
Matrix< R, 2, typename Internal::MultiplyType< P1, P2 >::type > operator* ( const Matrix< R, C, P1, Accessor > &  lhs,
const SO2< P2 > &  rhs 
)
related

Left-multiply by a Matrix.

◆ operator<<()

template<typename Precision >
std::ostream & operator<< ( std::ostream &  os,
const SO2< Precision > &  rhs 
)
related

Write an SO2 to a stream.

◆ operator>>()

template<typename Precision >
std::istream & operator>> ( std::istream &  is,
SO2< Precision > &  rhs 
)
related

Read from SO2 to a stream.


The documentation for this class was generated from the following files: