Translation< _Scalar, _Dim > Class Template Reference

Represents a translation transformation. More...

#include <Translation.h>

Public Types

enum  
 
typedef Transform< Scalar, Dim, AffineAffineTransformType
 
typedef Transform< Scalar, Dim, IsometryIsometryTransformType
 
typedef Matrix< Scalar, Dim, Dim > LinearMatrixType
 
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
 
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
 
Translation operator* (const Translation &other) const
 
AffineTransformType operator* (const UniformScaling< Scalar > &other) const
 
VectorType operator* (const VectorType &other) const
 
 Translation ()
 
template<typename OtherScalarType>
 Translation (const Translation< OtherScalarType, Dim > &other)
 
 Translation (const VectorType &vector)
 
Scalarx ()
 Retruns the x-translation as a reference.
 
Scalar x () const
 Retruns the x-translation by value.
 
Scalary ()
 Retruns the y-translation as a reference.
 
Scalar y () const
 Retruns the y-translation by value.
 
Scalarz ()
 Retruns the z-translation as a reference.
 
Scalar z () const
 Retruns the z-translation by value.
 

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

◆ AffineTransformType

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

corresponding affine transformation type

◆ IsometryTransformType

template<typename _Scalar, int _Dim>
typedef Transform<Scalar,Dim,Isometry> IsometryTransformType

corresponding isometric transformation type

◆ LinearMatrixType

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

corresponding linear transformation matrix type

◆ Scalar

template<typename _Scalar, int _Dim>
typedef _Scalar Scalar

the scalar type of the coefficients

◆ VectorType

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

corresponding vector type

Member Enumeration Documentation

◆ anonymous enum

template<typename _Scalar, int _Dim>
anonymous enum

dimension of the space

Constructor & Destructor Documentation

◆ Translation() [1/3]

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

Default constructor without initialization.

Referenced by Translation< Scalar, Dim >::inverse(), and Translation< Scalar, Dim >::operator*().

◆ Translation() [2/3]

template<typename _Scalar, int _Dim>
Translation ( const VectorType & vector)
inlineexplicit

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

◆ Translation() [3/3]

template<typename _Scalar, int _Dim>
template<typename OtherScalarType>
Translation ( const Translation< OtherScalarType, Dim > & other)
inlineexplicit

Copy constructor with scalar type conversion

Member Function Documentation

◆ cast()

template<typename _Scalar, int _Dim>
template<typename NewScalarType>
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.

Referenced by Translation< Scalar, Dim >::Translation().

◆ inverse()

template<typename _Scalar, int _Dim>
Translation inverse ( ) const
inline
Returns
the inverse translation (opposite)

◆ isApprox()

template<typename _Scalar, int _Dim>
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()

◆ operator*() [1/6]

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

◆ operator*() [2/6]

template<typename _Scalar, int _Dim>
template<typename Derived>
IsometryTransformType operator* ( const RotationBase< Derived, Dim > & r) const
inline

Concatenates a translation and a rotation

◆ operator*() [3/6]

template<typename _Scalar, int _Dim>
template<int Mode, int Options>
Transform< Scalar, Dim, Mode > operator* ( const Transform< Scalar, Dim, Mode, Options > & t) const
inline

Concatenates a translation and a transformation

◆ operator*() [4/6]

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

Concatenates two translation

◆ operator*() [5/6]

template<typename Scalar, int Dim>
Translation< Scalar, Dim >::AffineTransformType operator* ( const UniformScaling< Scalar > & other) const
inline

◆ operator*() [6/6]

template<typename _Scalar, int _Dim>
VectorType operator* ( const VectorType & other) const
inline

Applies translation to vector


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