TooN 2.1
|
Represent a two-dimensional Similarity transformation (a rotation, a uniform scale and a translation). More...
#include <sim2.h>
Public Member Functions | |
SIM2 () | |
template<class A > | |
SIM2 (const SO2< Precision > &R, const Vector< 2, Precision, A > &T, const Precision s) | |
template<int S, class P , class A > | |
SIM2 (const Vector< S, P, A > &v) | |
SO2< Precision > & | get_rotation () |
const SO2< Precision > & | get_rotation () const |
Vector< 2, Precision > & | get_translation () |
const Vector< 2, Precision > & | get_translation () const |
Precision & | get_scale () |
const Precision & | get_scale () const |
Vector< 4, Precision > | ln () const |
SIM2 | inverse () const |
template<typename P > | |
SIM2< typename Internal::MultiplyType < Precision, P >::type > | operator* (const SIM2< P > &rhs) const |
SIM2 & | operator*= (const SIM2 &rhs) |
template<typename Accessor > | |
Vector< 4, Precision > | adjoint (const Vector< 4, Precision, Accessor > &vect) const |
template<typename Accessor > | |
Matrix< 4, 4, Precision > | adjoint (const Matrix< 4, 4, Precision, Accessor > &M) const |
template<int S, typename PV , typename Accessor > | |
SIM2< Precision > | exp (const Vector< S, PV, Accessor > &mu) |
Static Public Member Functions | |
template<int S, typename P , typename A > | |
static SIM2 | exp (const Vector< S, P, A > &vect) |
static Vector< 4, Precision > | ln (const SIM2 &se2) |
static Matrix< 3, 3, Precision > | generator (int i) |
Related Functions | |
(Note that these are not member functions.) | |
template<class Precision > | |
std::ostream & | operator<< (std::ostream &os, const SIM2< Precision > &rhs) |
template<int S, typename P , typename PV , typename A > | |
Vector< 3, typename Internal::MultiplyType< P, PV > ::type > | operator* (const SIM2< P > &lhs, const Vector< S, PV, A > &rhs) |
template<typename P , typename PV , typename A > | |
Vector< 2, typename Internal::MultiplyType< P, PV > ::type > | operator* (const SIM2< P > &lhs, const Vector< 2, 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 SIM2< P > &rhs) |
template<int R, int Cols, typename PM , typename A , typename P > | |
Matrix< 3, Cols, typename Internal::MultiplyType< P, PM > ::type > | operator* (const SIM2< P > &lhs, const Matrix< R, Cols, PM, A > &rhs) |
template<int Rows, int C, typename PM , typename A , typename P > | |
Matrix< Rows, 3, typename Internal::MultiplyType< PM, P > ::type > | operator* (const Matrix< Rows, C, PM, A > &lhs, const SIM2< P > &rhs) |
Represent a two-dimensional Similarity transformation (a rotation, a uniform scale and a translation).
This can be represented by a matrix operating on a homogeneous co-ordinate, so that a vector is transformed to a new location by
This transformation is a member of the Lie group SIM2. These can be parameterised with four numbers (in the space of the Lie Algebra). In this class, the first two parameters are a translation vector while the third is the amount of rotation in the plane as for SO2. The forth is the logarithm of the scale factor.
const SO2<Precision>& get_rotation | ( | ) | const |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
const Vector<2, Precision>& get_translation | ( | ) | const |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
const Precision& get_scale | ( | ) | const |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Take the logarithm of the matrix, generating the corresponding vector in the Lie Algebra.
See the Detailed Description for details of this vector.
Vector<4, Precision> ln | ( | ) | const |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Referenced by SIM2< P >::ln().
SIM2<typename Internal::MultiplyType<Precision,P>::type> operator* | ( | const SIM2< P > & | rhs | ) | const |
Right-multiply by another SIM2 (concatenate the two transformations)
rhs | The multipier |
Self right-multiply by another SIM2 (concatenate the two transformations)
rhs | The multipier |
static Matrix<3,3, Precision> generator | ( | int | i | ) | [static] |
returns the generators for the Lie group.
These are a set of matrices that form a basis for the vector space of the Lie algebra.
std::ostream & operator<< | ( | std::ostream & | os, |
const SIM2< Precision > & | rhs | ||
) | [related] |
Write an SIM2 to a stream.
Vector< 3, typename Internal::MultiplyType< P, PV >::type > operator* | ( | const SIM2< P > & | lhs, |
const Vector< S, PV, A > & | rhs | ||
) | [related] |
Right-multiply with a Vector<3>
Vector< 2, typename Internal::MultiplyType< P, PV >::type > operator* | ( | const SIM2< P > & | lhs, |
const Vector< 2, PV, A > & | rhs | ||
) | [related] |
Right-multiply with a Vector<2> (special case, extended to be a homogeneous vector)
References SIM2< Precision >::get_rotation(), SIM2< Precision >::get_scale(), and SIM2< Precision >::get_translation().
Vector< 3, typename Internal::MultiplyType< PV, P >::type > operator* | ( | const Vector< S, PV, A > & | lhs, |
const SIM2< P > & | rhs | ||
) | [related] |
Left-multiply with a Vector<3>
Matrix< 3, Cols, typename Internal::MultiplyType< P, PM >::type > operator* | ( | const SIM2< P > & | lhs, |
const Matrix< R, Cols, PM, A > & | rhs | ||
) | [related] |
Right-multiply with a Matrix<3>
Matrix< Rows, 3, typename Internal::MultiplyType< PM, P >::type > operator* | ( | const Matrix< Rows, C, PM, A > & | lhs, |
const SIM2< P > & | rhs | ||
) | [related] |
Left-multiply with a Matrix<3>