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

Represents a translation transformation.

Template 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

This is defined in the Geometry module. #include <Eigen/Geometry>

Public types

enum (anonymous) { Dim = _Dim }
using AffineTransformType = Transform<Scalar, Dim, Affine>
using IsometryTransformType = Transform<Scalar, Dim, Isometry>
using LinearMatrixType = Matrix<Scalar, Dim, Dim>
using Scalar = _Scalar
using VectorType = Matrix<Scalar, Dim, 1>

Public static functions

static auto Identity() -> const Translation

Constructors, destructors, conversion operators

Translation()
Translation(const Scalar& sx, const Scalar& sy)
Translation(const Scalar& sx, const Scalar& sy, const Scalar& sz)
Translation(const VectorType& vector) explicit
template<typename OtherScalarType>
Translation(const Translation<OtherScalarType, Dim>& other) explicit

Public functions

template<typename NewScalarType>
auto cast() const -> internal::cast_return_type<Translation, Translation<NewScalarType, Dim>>::type
auto inverse() const -> Translation
auto isApprox(const Translation& other, const typename NumTraits<Scalar>::Real& prec = NumTraits<Scalar>::dummy_precision()) const -> bool
auto operator*(const Translation& other) const -> Translation
auto operator*(const UniformScaling<Scalar>& other) const -> AffineTransformType
template<typename OtherDerived>
auto operator*(const EigenBase<OtherDerived>& linear) const -> AffineTransformType
template<typename Derived>
auto operator*(const RotationBase<Derived, Dim>& r) const -> IsometryTransformType
template<int Mode, int Options>
auto operator*(const Transform<Scalar, Dim, Mode, Options>& t) const -> Transform<Scalar, Dim, Mode>
template<typename Derived>
auto operator*(const MatrixBase<Derived>& vec) const -> internal::enable_if<Derived::IsVectorAtCompileTime, VectorType>::type
auto operator=(const Translation& other) -> Translation&
auto translation() const -> const VectorType&
auto translation() -> VectorType&
auto vector() const -> const VectorType&
auto vector() -> VectorType&
auto x() const -> Scalar
Returns the x-translation by value.
auto x() -> Scalar&
Returns the x-translation as a reference.
auto y() const -> Scalar
Returns the y-translation by value.
auto y() -> Scalar&
Returns the y-translation as a reference.
auto z() const -> Scalar
Returns the z-translation by value.
auto z() -> Scalar&
Returns the z-translation as a reference.

Protected variables

VectorType m_coeffs

Friends

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

Enum documentation

template<typename _Scalar, int _Dim>
enum Eigen::Translation<_Scalar, _Dim>::(anonymous)

dimension of the space

Enumerators
Dim

Typedef documentation

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

corresponding affine transformation type

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

corresponding isometric transformation type

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

corresponding linear transformation matrix type

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

the scalar type of the coefficients

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

corresponding vector type

Function documentation

template<typename _Scalar, int _Dim>
static const Translation Eigen::Translation<_Scalar, _Dim>::Identity()

template<typename _Scalar, int _Dim>
Eigen::Translation<_Scalar, _Dim>::Translation()

Default constructor without initialization.

template<typename _Scalar, int _Dim>
Eigen::Translation<_Scalar, _Dim>::Translation(const Scalar& sx, const Scalar& sy)

template<typename _Scalar, int _Dim>
Eigen::Translation<_Scalar, _Dim>::Translation(const Scalar& sx, const Scalar& sy, const Scalar& sz)

template<typename _Scalar, int _Dim>
Eigen::Translation<_Scalar, _Dim>::Translation(const VectorType& vector) explicit

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

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

Copy constructor with scalar type conversion

template<typename _Scalar, int _Dim> template<typename NewScalarType>
internal::cast_return_type<Translation, Translation<NewScalarType, Dim>>::type Eigen::Translation<_Scalar, _Dim>::cast() const

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>
Translation Eigen::Translation<_Scalar, _Dim>::inverse() const

Returns the inverse translation (opposite)

template<typename _Scalar, int _Dim>
bool Eigen::Translation<_Scalar, _Dim>::isApprox(const Translation& other, const typename NumTraits<Scalar>::Real& prec = NumTraits<Scalar>::dummy_precision()) const

Returns true if *this is approximately equal to other, within the precision determined by prec.

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

Concatenates two translation

template<typename _Scalar, int _Dim>
AffineTransformType Eigen::Translation<_Scalar, _Dim>::operator*(const UniformScaling<Scalar>& other) const

Concatenates a translation and a uniform scaling

template<typename _Scalar, int _Dim> template<typename OtherDerived>
AffineTransformType Eigen::Translation<_Scalar, _Dim>::operator*(const EigenBase<OtherDerived>& linear) const

Concatenates a translation and a linear transformation

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

Concatenates a translation and a rotation

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

Concatenates a translation and a transformation

template<typename _Scalar, int _Dim> template<typename Derived>
internal::enable_if<Derived::IsVectorAtCompileTime, VectorType>::type Eigen::Translation<_Scalar, _Dim>::operator*(const MatrixBase<Derived>& vec) const

Applies translation to vector

template<typename _Scalar, int _Dim>
Translation& Eigen::Translation<_Scalar, _Dim>::operator=(const Translation& other)

template<typename _Scalar, int _Dim>
const VectorType& Eigen::Translation<_Scalar, _Dim>::translation() const

template<typename _Scalar, int _Dim>
VectorType& Eigen::Translation<_Scalar, _Dim>::translation()

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

template<typename _Scalar, int _Dim>
VectorType& Eigen::Translation<_Scalar, _Dim>::vector()

template<typename _Scalar, int _Dim>
Scalar Eigen::Translation<_Scalar, _Dim>::x() const

Returns the x-translation by value.

template<typename _Scalar, int _Dim>
Scalar& Eigen::Translation<_Scalar, _Dim>::x()

Returns the x-translation as a reference.

template<typename _Scalar, int _Dim>
Scalar Eigen::Translation<_Scalar, _Dim>::y() const

Returns the y-translation by value.

template<typename _Scalar, int _Dim>
Scalar& Eigen::Translation<_Scalar, _Dim>::y()

Returns the y-translation as a reference.

template<typename _Scalar, int _Dim>
Scalar Eigen::Translation<_Scalar, _Dim>::z() const

Returns the z-translation by value.

template<typename _Scalar, int _Dim>
Scalar& Eigen::Translation<_Scalar, _Dim>::z()

Returns the z-translation as a reference.

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

Returns the concatenation of a linear transformation l with the translation t

Variable documentation

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