Public Types | Public Member Functions | Static Public Member Functions | Protected Attributes | Friends

Translation< _Scalar, _Dim > Class Template Reference
[Geometry_Module]

Represents a translation transformation. More...

#include <Translation.h>

List of all members.

Public Types

enum  { Dim = _Dim }
enum  { Dim = _Dim }
typedef _Scalar Scalar
typedef Matrix< Scalar, Dim, 1 > VectorType
typedef Matrix< Scalar, Dim, Dim > LinearMatrixType
typedef Scaling< Scalar, Dim > ScalingType
typedef Transform< Scalar, Dim > TransformType
typedef _Scalar Scalar
typedef Matrix< Scalar, Dim, 1 > VectorType
typedef Matrix< Scalar, Dim, Dim > LinearMatrixType
typedef Transform< Scalar, Dim,
Affine > 
AffineTransformType

Public Member Functions

 Translation ()
 Translation (const Scalar &sx, const Scalar &sy)
 Translation (const Scalar &sx, const Scalar &sy, const Scalar &sz)
 Translation (const VectorType &vector)
const VectorTypevector () const
VectorTypevector ()
Translation operator* (const Translation &other) const
TransformType operator* (const ScalingType &other) const
TransformType operator* (const LinearMatrixType &linear) const
template<typename Derived >
TransformType operator* (const RotationBase< Derived, Dim > &r) const
TransformType operator* (const TransformType &t) const
VectorType operator* (const VectorType &other) const
Translation inverse () const
Translationoperator= (const Translation &other)
template<typename NewScalarType >
internal::cast_return_type
< Translation, Translation
< NewScalarType, Dim > >::type 
cast () const
template<typename OtherScalarType >
 Translation (const Translation< OtherScalarType, Dim > &other)
bool isApprox (const Translation &other, typename NumTraits< Scalar >::Real prec=precision< Scalar >()) const
 Translation ()
 Translation (const Scalar &sx, const Scalar &sy)
 Translation (const Scalar &sx, const Scalar &sy, const Scalar &sz)
 Translation (const VectorType &vector)
Scalar x () const
 Retruns the x-translation by value.
Scalar y () const
 Retruns the y-translation by value.
Scalar z () const
 Retruns the z-translation by value.
Scalarx ()
 Retruns the x-translation as a reference.
Scalary ()
 Retruns the y-translation as a reference.
Scalarz ()
 Retruns the z-translation as a reference.
const VectorTypevector () const
VectorTypevector ()
const VectorTypetranslation () const
VectorTypetranslation ()
Translation operator* (const Translation &other) const
AffineTransformType operator* (const UniformScaling< Scalar > &other) const
template<typename OtherDerived >
AffineTransformType operator* (const EigenBase< OtherDerived > &linear) const
template<typename Derived >
AffineTransformType operator* (const RotationBase< Derived, Dim > &r) const
template<int Mode, int Options>
Transform< Scalar, Dim, Mode > operator* (const Transform< Scalar, Dim, Mode, Options > &t) const
VectorType operator* (const VectorType &other) const
Translation inverse () const
Translationoperator= (const Translation &other)
template<typename NewScalarType >
internal::cast_return_type
< Translation, Translation
< NewScalarType, Dim > >::type 
cast () const
template<typename OtherScalarType >
 Translation (const Translation< OtherScalarType, Dim > &other)
bool isApprox (const Translation &other, typename NumTraits< Scalar >::Real prec=NumTraits< Scalar >::dummy_precision()) const

Static Public Member Functions

static const Translation Identity ()

Protected Attributes

VectorType m_coeffs

Friends

TransformType operator* (const LinearMatrixType &linear, const Translation &t)
template<typename OtherDerived >
AffineTransformType operator* (const EigenBase< OtherDerived > &linear, const Translation &t)

Detailed Description

template<typename _Scalar, int _Dim>
class Translation< _Scalar, _Dim >

Represents a translation transformation.

Parameters:
_Scalar the scalar type, i.e., the type of the coefficients.
_Dim the dimension of the space, can be a compile time value or Dynamic
Note:
This class is not aimed to be used to store a translation transformation, but rather to make easier the constructions and updates of Transform objects.
See also:
class Scaling, class Transform

Member Typedef Documentation

template<typename _Scalar, int _Dim>
typedef Transform<Scalar,Dim,Affine> Translation< _Scalar, _Dim >::AffineTransformType

corresponding affine transformation type

template<typename _Scalar, int _Dim>
typedef Matrix<Scalar,Dim,Dim> Translation< _Scalar, _Dim >::LinearMatrixType

corresponding linear transformation matrix type

template<typename _Scalar, int _Dim>
typedef Matrix<Scalar,Dim,Dim> Translation< _Scalar, _Dim >::LinearMatrixType

corresponding linear transformation matrix type

template<typename _Scalar, int _Dim>
typedef _Scalar Translation< _Scalar, _Dim >::Scalar

the scalar type of the coefficients

template<typename _Scalar, int _Dim>
typedef _Scalar Translation< _Scalar, _Dim >::Scalar

the scalar type of the coefficients

template<typename _Scalar, int _Dim>
typedef Scaling<Scalar,Dim> Translation< _Scalar, _Dim >::ScalingType

corresponding scaling transformation type

template<typename _Scalar, int _Dim>
typedef Transform<Scalar,Dim> Translation< _Scalar, _Dim >::TransformType

corresponding affine transformation type

template<typename _Scalar, int _Dim>
typedef Matrix<Scalar,Dim,1> Translation< _Scalar, _Dim >::VectorType

corresponding vector type

template<typename _Scalar, int _Dim>
typedef Matrix<Scalar,Dim,1> Translation< _Scalar, _Dim >::VectorType

corresponding vector type


Member Enumeration Documentation

template<typename _Scalar, int _Dim>
anonymous enum

dimension of the space

Enumerator:
Dim 
template<typename _Scalar, int _Dim>
anonymous enum

dimension of the space

Enumerator:
Dim 

Constructor & Destructor Documentation

template<typename _Scalar, int _Dim>
Translation< _Scalar, _Dim >::Translation (  )  [inline]

Default constructor without initialization.

template<typename _Scalar, int _Dim>
Translation< _Scalar, _Dim >::Translation ( const Scalar sx,
const Scalar sy 
) [inline]
template<typename _Scalar, int _Dim>
Translation< _Scalar, _Dim >::Translation ( const Scalar sx,
const Scalar sy,
const Scalar sz 
) [inline]
template<typename _Scalar, int _Dim>
Translation< _Scalar, _Dim >::Translation ( const VectorType vector  )  [inline, explicit]

Constructs and initialize the scaling transformation from a vector of scaling coefficients

template<typename _Scalar, int _Dim>
template<typename OtherScalarType >
Translation< _Scalar, _Dim >::Translation ( const Translation< OtherScalarType, Dim > &  other  )  [inline, explicit]

Copy constructor with scalar type conversion

template<typename _Scalar, int _Dim>
Translation< _Scalar, _Dim >::Translation (  )  [inline]

Default constructor without initialization.

template<typename _Scalar, int _Dim>
Translation< _Scalar, _Dim >::Translation ( const Scalar sx,
const Scalar sy 
) [inline]
template<typename _Scalar, int _Dim>
Translation< _Scalar, _Dim >::Translation ( const Scalar sx,
const Scalar sy,
const Scalar sz 
) [inline]
template<typename _Scalar, int _Dim>
Translation< _Scalar, _Dim >::Translation ( const VectorType vector  )  [inline, explicit]

Constructs and initialize the translation transformation from a vector of translation coefficients

template<typename _Scalar, int _Dim>
template<typename OtherScalarType >
Translation< _Scalar, _Dim >::Translation ( const Translation< OtherScalarType, Dim > &  other  )  [inline, explicit]

Copy constructor with scalar type conversion


Member Function Documentation

template<typename _Scalar, int _Dim>
template<typename NewScalarType >
internal::cast_return_type<Translation,Translation<NewScalarType,Dim> >::type Translation< _Scalar, _Dim >::cast (  )  const [inline]
Returns:
*this with scalar type casted to NewScalarType

Note that if NewScalarType is equal to the current scalar type of *this then this function smartly returns a const reference to *this.

template<typename _Scalar, int _Dim>
template<typename NewScalarType >
internal::cast_return_type<Translation,Translation<NewScalarType,Dim> >::type Translation< _Scalar, _Dim >::cast (  )  const [inline]
Returns:
*this with scalar type casted to NewScalarType

Note that if NewScalarType is equal to the current scalar type of *this then this function smartly returns a const reference to *this.

template<typename _Scalar, int _Dim>
static const Translation Translation< _Scalar, _Dim >::Identity (  )  [inline, static]
template<typename _Scalar, int _Dim>
Translation Translation< _Scalar, _Dim >::inverse ( void   )  const [inline]
Returns:
the inverse translation (opposite)
template<typename _Scalar, int _Dim>
Translation Translation< _Scalar, _Dim >::inverse ( void   )  const [inline]
Returns:
the inverse translation (opposite)
template<typename _Scalar, int _Dim>
bool Translation< _Scalar, _Dim >::isApprox ( const Translation< _Scalar, _Dim > &  other,
typename NumTraits< Scalar >::Real  prec = NumTraits<Scalar>::dummy_precision() 
) const [inline]
Returns:
true if *this is approximately equal to other, within the precision determined by prec.
See also:
MatrixBase::isApprox()
template<typename _Scalar, int _Dim>
bool Translation< _Scalar, _Dim >::isApprox ( const Translation< _Scalar, _Dim > &  other,
typename NumTraits< Scalar >::Real  prec = precision<Scalar>() 
) const [inline]
Returns:
true if *this is approximately equal to other, within the precision determined by prec.
See also:
MatrixBase::isApprox()
template<typename _Scalar, int _Dim>
template<int Mode, int Options>
Transform<Scalar,Dim,Mode> Translation< _Scalar, _Dim >::operator* ( const Transform< Scalar, Dim, Mode, Options > &  t  )  const [inline]

Concatenates a translation and a transformation

template<typename Scalar , int Dim>
Translation< Scalar, Dim >::TransformType Translation< Scalar, Dim >::operator* ( const ScalingType other  )  const [inline]

Concatenates a translation and a scaling

template<typename _Scalar, int _Dim>
VectorType Translation< _Scalar, _Dim >::operator* ( const VectorType other  )  const [inline]

Applies translation to vector

template<typename _Scalar, int _Dim>
Translation Translation< _Scalar, _Dim >::operator* ( const Translation< _Scalar, _Dim > &  other  )  const [inline]

Concatenates two translation

template<typename Scalar , int Dim>
Translation< Scalar, Dim >::TransformType Translation< Scalar, Dim >::operator* ( const LinearMatrixType linear  )  const [inline]

Concatenates a translation and a linear transformation

template<typename _Scalar, int _Dim>
Translation Translation< _Scalar, _Dim >::operator* ( const Translation< _Scalar, _Dim > &  other  )  const [inline]

Concatenates two translation

template<typename _Scalar, int _Dim>
template<typename Derived >
TransformType Translation< _Scalar, _Dim >::operator* ( const RotationBase< Derived, Dim > &  r  )  const [inline]
template<typename Scalar , int Dim>
Translation< Scalar, Dim >::AffineTransformType Translation< Scalar, Dim >::operator* ( const UniformScaling< Scalar > &  other  )  const [inline]

Concatenates a translation and a uniform scaling

template<typename Scalar , int Dim>
template<typename OtherDerived >
Translation< Scalar, Dim >::AffineTransformType Translation< Scalar, Dim >::operator* ( const EigenBase< OtherDerived > &  linear  )  const [inline]

Concatenates a translation and a linear transformation

template<typename _Scalar, int _Dim>
template<typename Derived >
AffineTransformType Translation< _Scalar, _Dim >::operator* ( const RotationBase< Derived, Dim > &  r  )  const [inline]

Concatenates a translation and a rotation

template<typename Scalar , int Dim>
Translation< Scalar, Dim >::TransformType Translation< Scalar, Dim >::operator* ( const TransformType t  )  const [inline]

Concatenates a translation and an affine transformation

template<typename _Scalar, int _Dim>
VectorType Translation< _Scalar, _Dim >::operator* ( const VectorType other  )  const [inline]

Applies translation to vector

template<typename _Scalar, int _Dim>
Translation& Translation< _Scalar, _Dim >::operator= ( const Translation< _Scalar, _Dim > &  other  )  [inline]
template<typename _Scalar, int _Dim>
Translation& Translation< _Scalar, _Dim >::operator= ( const Translation< _Scalar, _Dim > &  other  )  [inline]
template<typename _Scalar, int _Dim>
const VectorType& Translation< _Scalar, _Dim >::translation (  )  const [inline]
template<typename _Scalar, int _Dim>
VectorType& Translation< _Scalar, _Dim >::translation (  )  [inline]
template<typename _Scalar, int _Dim>
VectorType& Translation< _Scalar, _Dim >::vector (  )  [inline]
template<typename _Scalar, int _Dim>
const VectorType& Translation< _Scalar, _Dim >::vector (  )  const [inline]
template<typename _Scalar, int _Dim>
const VectorType& Translation< _Scalar, _Dim >::vector (  )  const [inline]
template<typename _Scalar, int _Dim>
VectorType& Translation< _Scalar, _Dim >::vector (  )  [inline]
template<typename _Scalar, int _Dim>
Scalar Translation< _Scalar, _Dim >::x (  )  const [inline]

Retruns the x-translation by value.

template<typename _Scalar, int _Dim>
Scalar& Translation< _Scalar, _Dim >::x (  )  [inline]

Retruns the x-translation as a reference.

template<typename _Scalar, int _Dim>
Scalar& Translation< _Scalar, _Dim >::y (  )  [inline]

Retruns the y-translation as a reference.

template<typename _Scalar, int _Dim>
Scalar Translation< _Scalar, _Dim >::y (  )  const [inline]

Retruns the y-translation by value.

template<typename _Scalar, int _Dim>
Scalar& Translation< _Scalar, _Dim >::z (  )  [inline]

Retruns the z-translation as a reference.

template<typename _Scalar, int _Dim>
Scalar Translation< _Scalar, _Dim >::z (  )  const [inline]

Retruns the z-translation by value.


Friends And Related Function Documentation

template<typename _Scalar, int _Dim>
TransformType operator* ( const LinearMatrixType linear,
const Translation< _Scalar, _Dim > &  t 
) [friend]

Concatenates a linear transformation and a translation

template<typename _Scalar, int _Dim>
template<typename OtherDerived >
AffineTransformType operator* ( const EigenBase< OtherDerived > &  linear,
const Translation< _Scalar, _Dim > &  t 
) [friend]
Returns:
the concatenation of a linear transformation l with the translation t

Member Data Documentation

template<typename _Scalar, int _Dim>
VectorType Translation< _Scalar, _Dim >::m_coeffs [protected]

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