Lines Matching defs:Translation
17 * \class Translation
19 * \brief Represents a translation transformation
24 * \note This class is not aimed to be used to store a translation transformation,
30 class Translation
54 EIGEN_DEVICE_FUNC Translation() {}
56 EIGEN_DEVICE_FUNC inline Translation(const Scalar& sx, const Scalar& sy)
63 EIGEN_DEVICE_FUNC inline Translation(const Scalar& sx, const Scalar& sy, const Scalar& sz)
70 /** Constructs and initialize the translation transformation from a vector of translation coefficients */
71 EIGEN_DEVICE_FUNC explicit inline Translation(const VectorType& vector) : m_coeffs(vector) {}
73 /** \brief Retruns the x-translation by value. **/
75 /** \brief Retruns the y-translation by value. **/
77 /** \brief Retruns the z-translation by value. **/
80 /** \brief Retruns the x-translation as a reference. **/
82 /** \brief Retruns the y-translation as a reference. **/
84 /** \brief Retruns the z-translation as a reference. **/
90 EIGEN_DEVICE_FUNC const VectorType& translation() const { return m_coeffs; }
91 EIGEN_DEVICE_FUNC VectorType& translation() { return m_coeffs; }
93 /** Concatenates two translation */
94 EIGEN_DEVICE_FUNC inline Translation operator* (const Translation& other) const
95 { return Translation(m_coeffs + other.m_coeffs); }
97 /** Concatenates a translation and a uniform scaling */
100 /** Concatenates a translation and a linear transformation */
104 /** Concatenates a translation and a rotation */
109 /** \returns the concatenation of a linear transformation \a l with the translation \a t */
112 EIGEN_DEVICE_FUNC inline AffineTransformType operator*(const EigenBase<OtherDerived>& linear, const Translation& t)
117 res.translation() = linear.derived() * t.m_coeffs;
123 /** Concatenates a translation and a transformation */
132 /** Applies translation to vector */
138 /** \returns the inverse translation (opposite) */
139 Translation inverse() const { return Translation(-m_coeffs); }
141 Translation& operator=(const Translation& other)
147 static const Translation Identity() { return Translation(VectorType::Zero()); }
155 EIGEN_DEVICE_FUNC inline typename internal::cast_return_type<Translation,Translation<NewScalarType,Dim> >::type cast() const
156 { return typename internal::cast_return_type<Translation,Translation<NewScalarType,Dim> >::type(*this); }
160 EIGEN_DEVICE_FUNC inline explicit Translation(const Translation<OtherScalarType,Dim>& other)
167 EIGEN_DEVICE_FUNC bool isApprox(const Translation& other, const typename NumTraits<Scalar>::Real& prec = NumTraits<Scalar>::dummy_precision()) const
174 typedef Translation<float, 2> Translation2f;
175 typedef Translation<double,2> Translation2d;
176 typedef Translation<float, 3> Translation3f;
177 typedef Translation<double,3> Translation3d;
181 EIGEN_DEVICE_FUNC inline typename Translation<Scalar,Dim>::AffineTransformType
182 Translation<Scalar,Dim>::operator* (const UniformScaling<Scalar>& other) const
187 res.translation() = m_coeffs;
194 EIGEN_DEVICE_FUNC inline typename Translation<Scalar,Dim>::AffineTransformType
195 Translation<Scalar,Dim>::operator* (const EigenBase<OtherDerived>& linear) const
200 res.translation() = m_coeffs;