10 #ifndef EIGEN_TRANSLATION_H 11 #define EIGEN_TRANSLATION_H 29 template<
typename _Scalar,
int _Dim>
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)
71 EIGEN_DEVICE_FUNC
explicit inline Translation(
const VectorType&
vector) : m_coeffs(vector) {}
74 EIGEN_DEVICE_FUNC
inline Scalar
x()
const {
return m_coeffs.x(); }
76 EIGEN_DEVICE_FUNC
inline Scalar
y()
const {
return m_coeffs.y(); }
78 EIGEN_DEVICE_FUNC
inline Scalar
z()
const {
return m_coeffs.z(); }
81 EIGEN_DEVICE_FUNC
inline Scalar&
x() {
return m_coeffs.x(); }
83 EIGEN_DEVICE_FUNC
inline Scalar&
y() {
return m_coeffs.y(); }
85 EIGEN_DEVICE_FUNC
inline Scalar&
z() {
return m_coeffs.z(); }
101 template<
typename OtherDerived>
105 template<
typename Derived>
111 template<
typename OtherDerived>
friend 114 AffineTransformType res;
124 template<
int Mode,
int Options>
133 template<
typename Derived>
136 {
return m_coeffs + vec.derived(); }
143 m_coeffs = other.m_coeffs;
154 template<
typename NewScalarType>
159 template<
typename OtherScalarType>
161 { m_coeffs = other.vector().template cast<Scalar>(); }
168 {
return m_coeffs.isApprox(other.m_coeffs, prec); }
180 template<
typename Scalar,
int Dim>
184 AffineTransformType res;
192 template<
typename Scalar,
int Dim>
193 template<
typename OtherDerived>
197 AffineTransformType res;
208 #endif // EIGEN_TRANSLATION_H EIGEN_DEVICE_FUNC VectorType & translation()
EIGEN_DEVICE_FUNC Derived & setZero(Index size)
EIGEN_DEVICE_FUNC Scalar y() const
Retruns the y-translation by value.
Translation & operator=(const Translation &other)
Translation< double, 3 > Translation3d
Matrix< Scalar, Dim, Dim > LinearMatrixType
EIGEN_DEVICE_FUNC const VectorType & vector() const
Holds information about the various numeric (i.e. scalar) types allowed by Eigen. ...
Translation inverse() const
static const Translation Identity()
#define EIGEN_MAKE_ALIGNED_OPERATOR_NEW_IF_VECTORIZABLE_FIXED_SIZE(Scalar, Size)
Translation< float, 3 > Translation3f
EIGEN_DEVICE_FUNC internal::cast_return_type< Translation, Translation< NewScalarType, Dim > >::type cast() const
Represents a translation transformation.
EIGEN_DEVICE_FUNC VectorType & vector()
EIGEN_DEVICE_FUNC Translation(const VectorType &vector)
EIGEN_DEVICE_FUNC Translation(const Scalar &sx, const Scalar &sy)
Translation< float, 2 > Translation2f
Transform< Scalar, Dim, Affine > AffineTransformType
EIGEN_DEVICE_FUNC const VectorType & translation() const
Common base class for compact rotation representations.
EIGEN_DEVICE_FUNC Scalar z() const
Retruns the z-translation by value.
Transform< Scalar, Dim, Isometry > IsometryTransformType
EIGEN_DEVICE_FUNC Translation()
EIGEN_DEVICE_FUNC Scalar & y()
Retruns the y-translation as a reference.
EIGEN_DEVICE_FUNC Scalar & z()
Retruns the z-translation as a reference.
EIGEN_DEVICE_FUNC IsometryTransformType operator*(const RotationBase< Derived, Dim > &r) const
EIGEN_DEVICE_FUNC Translation(const Scalar &sx, const Scalar &sy, const Scalar &sz)
Translation< double, 2 > Translation2d
Matrix< Scalar, Dim, 1 > VectorType
EIGEN_DEVICE_FUNC Scalar & x()
Retruns the x-translation as a reference.
friend EIGEN_DEVICE_FUNC AffineTransformType operator*(const EigenBase< OtherDerived > &linear, const Translation &t)
EIGEN_DEVICE_FUNC Scalar x() const
Retruns the x-translation by value.
EIGEN_DEVICE_FUNC Derived & derived()
Base class for all dense matrices, vectors, and expressions.
EIGEN_DEVICE_FUNC Translation operator*(const Translation &other) const
EIGEN_DEVICE_FUNC Translation(const Translation< OtherScalarType, Dim > &other)
EIGEN_DEVICE_FUNC bool isApprox(const Translation &other, const typename NumTraits< Scalar >::Real &prec=NumTraits< Scalar >::dummy_precision()) const