TooN 2.1
|
Class to represent a three-dimensional rotation matrix. More...
#include <so3.h>
Classes | |
struct | Invert |
Public Member Functions | |
SO3 () | |
template<int S, typename P , typename A > | |
SO3 (const Vector< S, P, A > &v) | |
template<int R, int C, typename P , typename A > | |
SO3 (const Matrix< R, C, P, A > &rhs) | |
template<int S1, int S2, typename P1 , typename P2 , typename A1 , typename A2 > | |
SO3 (const Vector< S1, P1, A1 > &a, const Vector< S2, P2, A2 > &b) | |
template<int R, int C, typename P , typename A > | |
SO3 & | operator= (const Matrix< R, C, P, A > &rhs) |
void | coerce () |
Vector< 3, Precision > | ln () const |
SO3 | inverse () const |
template<typename P > | |
SO3 & | operator*= (const SO3< P > &rhs) |
template<typename P > | |
SO3< typename Internal::MultiplyType < Precision, P >::type > | operator* (const SO3< P > &rhs) const |
const Matrix< 3, 3, Precision > & | get_matrix () const |
template<int S, typename A > | |
Vector< 3, Precision > | adjoint (const Vector< S, Precision, A > &vect) const |
template<typename PA , typename PB > | |
SO3 (const SO3< PA > &a, const SO3< PB > &b) | |
template<int S, typename VP , typename VA > | |
SO3< Precision > | exp (const Vector< S, VP, VA > &w) |
Static Public Member Functions | |
template<int S, typename VP , typename A > | |
static SO3 | exp (const Vector< S, VP, A > &vect) |
static Matrix< 3, 3, Precision > | generator (int i) |
template<typename Base > | |
static Vector< 3, Precision > | generator_field (int i, const Vector< 3, Precision, Base > &pos) |
Friends | |
std::istream & | operator>> (std::istream &is, SO3< Precision > &rhs) |
std::istream & | operator>> (std::istream &is, SE3< Precision > &rhs) |
std::istream & | operator>> (std::istream &is, SIM3< Precision > &rhs) |
Related Functions | |
(Note that these are not member functions.) | |
template<typename Precision > | |
std::ostream & | operator<< (std::ostream &os, const SO3< Precision > &rhs) |
template<typename Precision , int S, typename VP , typename VA , typename MA > | |
void | rodrigues_so3_exp (const Vector< S, VP, VA > &w, const Precision A, const Precision B, Matrix< 3, 3, Precision, MA > &R) |
template<int S, typename P , typename PV , typename A > | |
Vector< 3, typename Internal::MultiplyType< P, PV > ::type > | operator* (const SO3< P > &lhs, const Vector< S, PV, A > &rhs) |
template<int S, typename P , typename PV , typename A > | |
Vector< 3, typename Internal::MultiplyType< PV, P > ::type > | operator* (const Vector< S, PV, A > &lhs, const SO3< P > &rhs) |
template<int R, int C, typename P , typename PM , typename A > | |
Matrix< 3, C, typename Internal::MultiplyType< P, PM > ::type > | operator* (const SO3< P > &lhs, const Matrix< R, C, PM, A > &rhs) |
template<int R, int C, typename P , typename PM , typename A > | |
Matrix< R, 3, typename Internal::MultiplyType< PM, P > ::type > | operator* (const Matrix< R, C, PM, A > &lhs, const SO3< P > &rhs) |
Class to represent a three-dimensional rotation matrix.
Three-dimensional rotation matrices are members of the Special Orthogonal Lie group SO3. This group can be parameterised three numbers (a vector in the space of the Lie Algebra). In this class, the three parameters are the finite rotation vector, i.e. a three-dimensional vector whose direction is the axis of rotation and whose length is the angle of rotation in radians. Exponentiating this vector gives the matrix, and the logarithm of the matrix gives this vector.
Assignment operator from a general matrix.
This also calls coerce() to make sure that the matrix is a valid rotation matrix.
Exponentiate a vector in the Lie algebra to generate a new SO3.
See the Detailed Description for details of this vector.
Referenced by SO3< P >::SO3().
Vector< 3, Precision > ln | ( | ) | const |
Take the logarithm of the matrix, generating the corresponding vector in the Lie Algebra.
See the Detailed Description for details of this vector.
References TooN::sqrt(), and TooN::unit().
static Matrix<3,3, Precision> generator | ( | int | i | ) | [static] |
Returns the i-th generator.
The generators of a Lie group are the basis for the space of the Lie algebra. For SO3, the generators are three matrices representing the three possible (linearised) rotations.
Perform the exponential of the matrix .
w | Weightings of the generator matrices. |
References Vector< Size, Precision, Base >::size(), and TooN::sqrt().
std::istream & operator>> | ( | std::istream & | is, |
SO3< Precision > & | rhs | ||
) | [friend] |
Read from SO3 to a stream.
std::istream & operator>> | ( | std::istream & | is, |
SE3< Precision > & | rhs | ||
) | [friend] |
Reads an SE3 from a stream.
std::istream & operator>> | ( | std::istream & | is, |
SIM3< Precision > & | rhs | ||
) | [friend] |
Reads an SIM3 from a stream.
std::ostream & operator<< | ( | std::ostream & | os, |
const SO3< Precision > & | rhs | ||
) | [related] |
Write an SO3 to a stream.
void rodrigues_so3_exp | ( | const Vector< S, VP, VA > & | w, |
const Precision | A, | ||
const Precision | B, | ||
Matrix< 3, 3, Precision, MA > & | R | ||
) | [related] |
Compute a rotation exponential using the Rodrigues Formula.
The rotation axis is given by , and the rotation angle must be computed using . This is provided as a separate function primarily to allow fast and rough matrix exponentials using fast and rough approximations to A and B.
References Vector< Size, Precision, Base >::size().
Vector< 3, typename Internal::MultiplyType< P, PV >::type > operator* | ( | const SO3< P > & | lhs, |
const Vector< S, PV, A > & | rhs | ||
) | [related] |
Right-multiply by a Vector.
References SO3< Precision >::get_matrix().
Vector< 3, typename Internal::MultiplyType< PV, P >::type > operator* | ( | const Vector< S, PV, A > & | lhs, |
const SO3< P > & | rhs | ||
) | [related] |
Left-multiply by a Vector.
References SO3< Precision >::get_matrix().
Matrix< 3, C, typename Internal::MultiplyType< P, PM >::type > operator* | ( | const SO3< P > & | lhs, |
const Matrix< R, C, PM, A > & | rhs | ||
) | [related] |
Right-multiply by a matrix.
References SO3< Precision >::get_matrix().
Matrix< R, 3, typename Internal::MultiplyType< PM, P >::type > operator* | ( | const Matrix< R, C, PM, A > & | lhs, |
const SO3< P > & | rhs | ||
) | [related] |
Left-multiply by a matrix.
References SO3< Precision >::get_matrix().