10 #ifndef EIGEN_TRANSLATION_H
11 #define EIGEN_TRANSLATION_H
31 template<
typename Scalar_,
int Dim_>
103 template<
typename OtherDerived>
107 template<
typename Derived>
113 template<
typename OtherDerived>
friend
117 res.matrix().setZero();
120 res.matrix().row(
Dim).setZero();
126 template<
int Mode,
int Options>
135 template<
typename Derived>
136 inline std::enable_if_t<Derived::IsVectorAtCompileTime,VectorType>
150 template<
typename NewScalarType>
151 EIGEN_DEVICE_FUNC inline typename internal::cast_return_type<Translation,Translation<NewScalarType,Dim> >::type
cast()
const
152 {
return typename internal::cast_return_type<Translation,Translation<NewScalarType,Dim> >::type(*
this); }
155 template<
typename OtherScalarType>
176 template<
typename Scalar,
int Dim>
181 res.matrix().setZero();
182 res.linear().diagonal().fill(other.
factor());
183 res.translation() = m_coeffs;
188 template<
typename Scalar,
int Dim>
189 template<
typename OtherDerived>
194 res.matrix().setZero();
196 res.translation() = m_coeffs;
197 res.matrix().row(Dim).setZero();
#define EIGEN_DEVICE_FUNC
#define EIGEN_MAKE_ALIGNED_OPERATOR_NEW_IF_VECTORIZABLE_FIXED_SIZE(Scalar, Size)
cout<< "Here is the matrix m:"<< endl<< m<< endl;Matrix< ptrdiff_t, 3, 1 > res
Base class for all dense matrices, vectors, and expressions.
Common base class for compact rotation representations.
Represents a translation transformation.
Matrix< Scalar, Dim, 1 > VectorType
Translation(const VectorType &vector)
Scalar z() const
Returns the z-translation by value.
Translation operator*(const Translation &other) const
Scalar & x()
Returns the x-translation as a reference.
Matrix< Scalar, Dim, Dim > LinearMatrixType
Transform< Scalar, Dim, Isometry > IsometryTransformType
Transform< Scalar, Dim, Affine > AffineTransformType
internal::cast_return_type< Translation, Translation< NewScalarType, Dim > >::type cast() const
IsometryTransformType operator*(const RotationBase< Derived, Dim > &r) const
static const Translation Identity()
bool isApprox(const Translation &other, const typename NumTraits< Scalar >::Real &prec=NumTraits< Scalar >::dummy_precision()) const
const VectorType & vector() const
Scalar & z()
Returns the z-translation as a reference.
Translation(const Scalar &sx, const Scalar &sy, const Scalar &sz)
const VectorType & translation() const
friend AffineTransformType operator*(const EigenBase< OtherDerived > &linear, const Translation &t)
VectorType & translation()
Scalar x() const
Returns the x-translation by value.
Translation(const Scalar &sx, const Scalar &sy)
Scalar y() const
Returns the y-translation by value.
Translation(const Translation< OtherScalarType, Dim > &other)
Translation inverse() const
Scalar & y()
Returns the y-translation as a reference.
Translation< float, 2 > Translation2f
Translation< double, 2 > Translation2d
Translation< float, 3 > Translation3f
Translation< double, 3 > Translation3d
Holds information about the various numeric (i.e. scalar) types allowed by Eigen.