Public Types | Public Member Functions | Static Public Member Functions | Protected Attributes | Friends | List of all members
Translation< _Scalar, _Dim > Class Template Reference

Represents a translation transformation. More...

#include <Translation.h>

Public Types

enum  { Dim }
typedef Transform< Scalar, Dim,
Affine
AffineTransformType
typedef Transform< Scalar, Dim,
Isometry
IsometryTransformType
typedef Matrix< Scalar, Dim, DimLinearMatrixType
typedef _Scalar Scalar
typedef Matrix< Scalar, Dim, 1 > VectorType

Public Member Functions

template<typename NewScalarType >
internal::cast_return_type
< Translation, Translation
< NewScalarType, Dim > >::type 
cast () const
Translation inverse () const
bool isApprox (const Translation &other, typename NumTraits< Scalar >::Real prec=NumTraits< Scalar >::dummy_precision()) const
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 >
IsometryTransformType 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
Translationoperator= (const Translation &other)
 Translation ()
 Translation (const Scalar &sx, const Scalar &sy)
 Translation (const Scalar &sx, const Scalar &sy, const Scalar &sz)
 Translation (const VectorType &vector)
const VectorTypetranslation () const
VectorTypetranslation ()
template<typename OtherScalarType >
 Translation (const Translation< OtherScalarType, Dim > &other)
const VectorTypevector () const
VectorTypevector ()
Scalar x () const
 Retruns the x-translation by value.
Scalarx ()
 Retruns the x-translation as a reference.
Scalar y () const
 Retruns the y-translation by value.
Scalary ()
 Retruns the y-translation as a reference.
Scalar z () const
 Retruns the z-translation by value.
Scalarz ()
 Retruns the z-translation as a reference.

Static Public Member Functions

static const Translation Identity ()

Protected Attributes

VectorType m_coeffs

Friends

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

Detailed Description

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

Represents a translation transformation.

This is defined in the Geometry module.

#include <Eigen/Geometry>
Parameters
_Scalarthe scalar type, i.e., the type of the coefficients.
_Dimthe 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

corresponding affine transformation type

corresponding isometric transformation type

corresponding linear transformation matrix type

typedef _Scalar Scalar

the scalar type of the coefficients

corresponding vector type

Member Enumeration Documentation

anonymous enum

dimension of the space

Enumerator:
Dim 

Constructor & Destructor Documentation

Translation ( )
inline
Translation ( const Scalar sx,
const Scalar sy 
)
inline
Translation ( const Scalar sx,
const Scalar sy,
const Scalar sz 
)
inline
Translation ( const VectorType vector)
inlineexplicit

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

Translation ( const Translation< OtherScalarType, Dim > &  other)
inlineexplicit

Copy constructor with scalar type conversion

References Translation< _Scalar, _Dim >::m_coeffs, and Translation< _Scalar, _Dim >::vector().

Member Function Documentation

internal::cast_return_type<Translation,Translation<NewScalarType,Dim> >::type 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.

static const Translation Identity ( )
inlinestatic
Translation inverse ( ) const
inline
Returns
the inverse translation (opposite)

References Translation< _Scalar, _Dim >::m_coeffs, and Translation< _Scalar, _Dim >::Translation().

bool 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()

References Translation< _Scalar, _Dim >::m_coeffs.

Translation operator* ( const Translation< _Scalar, _Dim > &  other) const
inline
Translation< Scalar, Dim >::AffineTransformType operator* ( const UniformScaling< Scalar > &  other) const
inline
Translation< Scalar, Dim >::AffineTransformType operator* ( const EigenBase< OtherDerived > &  linear) const
inline
IsometryTransformType operator* ( const RotationBase< Derived, Dim > &  r) const
inline

Concatenates a translation and a rotation

Transform<Scalar,Dim,Mode> operator* ( const Transform< Scalar, Dim, Mode, Options > &  t) const
inline

Concatenates a translation and a transformation

References Translation< _Scalar, _Dim >::m_coeffs, and Transform< _Scalar, _Dim, _Mode, _Options >::pretranslate().

VectorType operator* ( const VectorType other) const
inline

Applies translation to vector

References Translation< _Scalar, _Dim >::m_coeffs.

Translation& operator= ( const Translation< _Scalar, _Dim > &  other)
inline
const VectorType& translation ( ) const
inline
VectorType& translation ( )
inline
const VectorType& vector ( ) const
inline
VectorType& vector ( )
inline
Scalar x ( ) const
inline

Retruns the x-translation by value.

References Translation< _Scalar, _Dim >::m_coeffs.

Scalar& x ( )
inline

Retruns the x-translation as a reference.

References Translation< _Scalar, _Dim >::m_coeffs.

Scalar y ( ) const
inline

Retruns the y-translation by value.

References Translation< _Scalar, _Dim >::m_coeffs.

Scalar& y ( )
inline

Retruns the y-translation as a reference.

References Translation< _Scalar, _Dim >::m_coeffs.

Scalar z ( ) const
inline

Retruns the z-translation by value.

References Translation< _Scalar, _Dim >::m_coeffs.

Scalar& z ( )
inline

Retruns the z-translation as a reference.

References Translation< _Scalar, _Dim >::m_coeffs.

Friends And Related Function Documentation

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

VectorType m_coeffs
protected

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