Lines Matching refs:Transform
19 template<typename Transform>
24 Dim = Transform::Dim,
25 HDim = Transform::HDim,
26 Mode = Transform::Mode,
69 * \class Transform
86 * this class you have to think a Transform object as its internal
101 * However, unlike a plain matrix, the Transform class provides many features
103 * with any other transformations (Transform,Translation,RotationBase,Matrix)
104 * and can be directly used to transform implicit homogeneous vectors. All these
109 * according to the nature of each terms. Likewise, when applying the transform
150 * The concatenation of a Transform object with any kind of other transformation
151 * always returns a Transform object.
159 * it is not possible to directly transform Dim vectors stored in a Dim x Dim matrix.
176 class Transform
219 /** The return type of the product between a diagonal matrix and a transform */
220 typedef Transform<Scalar,Dim,TransformTimeDiagonalMode> TransformTimeDiagonalReturnType;
230 inline Transform()
237 inline Transform(const Transform& other)
243 inline explicit Transform(const TranslationType& t)
248 inline explicit Transform(const UniformScaling<Scalar>& s)
254 inline explicit Transform(const RotationBase<Derived, Dim>& r)
260 inline Transform& operator=(const Transform& other)
263 typedef internal::transform_take_affine_part<Transform> take_affine_part;
267 inline explicit Transform(const EigenBase<OtherDerived>& other)
278 inline Transform& operator=(const EigenBase<OtherDerived>& other)
288 inline Transform(const Transform<Scalar,Dim,Mode,OtherOptions>& other)
296 inline Transform(const Transform<Scalar,Dim,OtherMode,OtherOptions>& other)
323 typedef typename Transform<Scalar,Dim,OtherMode,OtherOptions>::MatrixType OtherMatrixType;
337 Transform(const ReturnByValue<OtherDerived>& other)
344 Transform& operator=(const ReturnByValue<OtherDerived>& other)
351 inline Transform(const QMatrix& other);
352 inline Transform& operator=(const QMatrix& other);
354 inline Transform(const QTransform& other);
355 inline Transform& operator=(const QTransform& other);
386 /** \returns an expression of the product between the transform \c *this and a matrix expression \a other
399 EIGEN_STRONG_INLINE const typename internal::transform_right_product_impl<Transform, OtherDerived>::ResultType
401 { return internal::transform_right_product_impl<Transform, OtherDerived>::run(*this,other.derived()); }
403 /** \returns the product expression of a transformation matrix \a a times a transform \a b
412 operator * (const EigenBase<OtherDerived> &a, const Transform &b)
415 /** \returns The product expression of a transform \a a times a diagonal matrix \a b
418 * product results in a Transform of the same type (mode) as the lhs only if the lhs
419 * mode is no isometry. In that case, the returned transform is an affinity.
430 /** \returns The product expression of a diagonal matrix \a a times a transform \a b
433 * product results in a Transform of the same type (mode) as the lhs only if the lhs
434 * mode is no isometry. In that case, the returned transform is an affinity.
438 operator * (const DiagonalBase<DiagonalDerived> &a, const Transform &b)
449 inline Transform& operator*=(const EigenBase<OtherDerived>& other) { return *this = *this * other; }
452 inline const Transform operator * (const Transform& other) const
454 return internal::transform_transform_product_impl<Transform,Transform>::run(*this,other);
460 // error: template instantiation resulted in unexpected function type of "Eigen::Transform<double, 3, 32, 0>
461 // (const Eigen::Transform<double, 3, 2, 0> &) const"
463 // "Eigen::internal::transform_transform_product_impl<Eigen::Transform<double, 3, 32, 0>,
464 // Eigen::Transform<double, 3, Mode, Options>, <expression>>::ResultType (const Eigen::Transform<double, 3, Mode, Options> &) const")
468 typedef internal::transform_transform_product_impl<Transform,Transform<Scalar,Dim,OtherMode,OtherOptions> > ProductType;
476 operator * (const Transform<Scalar,Dim,OtherMode,OtherOptions>& other) const
484 inline typename internal::transform_transform_product_impl<Transform,Transform<Scalar,Dim,OtherMode,OtherOptions> >::ResultType
485 operator * (const Transform<Scalar,Dim,OtherMode,OtherOptions>& other) const
487 return internal::transform_transform_product_impl<Transform,Transform<Scalar,Dim,OtherMode,OtherOptions> >::run(*this,other);
496 * \todo In the future this function should be returning a Transform expression.
498 static const Transform Identity()
500 return Transform(MatrixType::Identity());
504 inline Transform& scale(const MatrixBase<OtherDerived> &other);
507 inline Transform& prescale(const MatrixBase<OtherDerived> &other);
509 inline Transform& scale(Scalar s);
510 inline Transform& prescale(Scalar s);
513 inline Transform& translate(const MatrixBase<OtherDerived> &other);
516 inline Transform& pretranslate(const MatrixBase<OtherDerived> &other);
519 inline Transform& rotate(const RotationType& rotation);
522 inline Transform& prerotate(const RotationType& rotation);
524 Transform& shear(Scalar sx, Scalar sy);
525 Transform& preshear(Scalar sx, Scalar sy);
527 inline Transform& operator=(const TranslationType& t);
528 inline Transform& operator*=(const TranslationType& t) { return translate(t.vector()); }
529 inline Transform operator*(const TranslationType& t) const;
531 inline Transform& operator=(const UniformScaling<Scalar>& t);
532 inline Transform& operator*=(const UniformScaling<Scalar>& s) { return scale(s.factor()); }
533 inline Transform<Scalar,Dim,(int(Mode)==int(Isometry)?Affine:Isometry)> operator*(const UniformScaling<Scalar>& s) const
535 Transform<Scalar,Dim,(int(Mode)==int(Isometry)?Affine:Isometry),Options> res = *this;
540 inline Transform& operator*=(const DiagonalMatrix<Scalar,Dim>& s) { linear() *= s; return *this; }
543 inline Transform& operator=(const RotationBase<Derived,Dim>& r);
545 inline Transform& operator*=(const RotationBase<Derived,Dim>& r) { return rotate(r.toRotationMatrix()); }
547 inline Transform operator*(const RotationBase<Derived,Dim>& r) const;
556 Transform& fromPositionOrientationScale(const MatrixBase<PositionDerived> &position,
559 inline Transform inverse(TransformTraits traits = (TransformTraits)Mode) const;
572 inline typename internal::cast_return_type<Transform,Transform<NewScalarType,Dim,Mode,Options> >::type cast() const
573 { return typename internal::cast_return_type<Transform,Transform<NewScalarType,Dim,Mode,Options> >::type(*this); }
577 inline explicit Transform(const Transform<OtherScalarType,Dim,Mode,Options>& other)
587 bool isApprox(const Transform& other, typename NumTraits<Scalar>::Real prec = NumTraits<Scalar>::dummy_precision()) const
643 typedef Transform<float,2,Isometry> Isometry2f;
645 typedef Transform<float,3,Isometry> Isometry3f;
647 typedef Transform<double,2,Isometry> Isometry2d;
649 typedef Transform<double,3,Isometry> Isometry3d;
652 typedef Transform<float,2,Affine> Affine2f;
654 typedef Transform<float,3,Affine> Affine3f;
656 typedef Transform<double,2,Affine> Affine2d;
658 typedef Transform<double,3,Affine> Affine3d;
661 typedef Transform<float,2,AffineCompact> AffineCompact2f;
663 typedef Transform<float,3,AffineCompact> AffineCompact3f;
665 typedef Transform<double,2,AffineCompact> AffineCompact2d;
667 typedef Transform<double,3,AffineCompact> AffineCompact3d;
670 typedef Transform<float,2,Projective> Projective2f;
672 typedef Transform<float,3,Projective> Projective3f;
674 typedef Transform<double,2,Projective> Projective2d;
676 typedef Transform<double,3,Projective> Projective3d;
688 Transform<Scalar,Dim,Mode,Options>::Transform(const QMatrix& other)
699 Transform<Scalar,Dim,Mode,Options>& Transform<Scalar,Dim,Mode,Options>::operator=(const QMatrix& other)
715 QMatrix Transform<Scalar,Dim,Mode,Options>::toQMatrix(void) const
729 Transform<Scalar,Dim,Mode,Options>::Transform(const QTransform& other)
740 Transform<Scalar,Dim,Mode,Options>& Transform<Scalar,Dim,Mode,Options>::operator=(const QTransform& other)
759 QTransform Transform<Scalar,Dim,Mode,Options>::toQTransform(void) const
783 Transform<Scalar,Dim,Mode,Options>&
784 Transform<Scalar,Dim,Mode,Options>::scale(const MatrixBase<OtherDerived> &other)
797 inline Transform<Scalar,Dim,Mode,Options>& Transform<Scalar,Dim,Mode,Options>::scale(Scalar s)
810 Transform
811 Transform<Scalar,Dim,Mode,Options>::prescale(const MatrixBase<OtherDerived> &other)
824 inline Transform<Scalar,Dim,Mode,Options>& Transform<Scalar,Dim,Mode,Options>::prescale(Scalar s)
837 Transform<Scalar,Dim,Mode,Options>&
838 Transform<Scalar,Dim,Mode,Options>::translate(const MatrixBase<OtherDerived> &other)
851 Transform<Scalar,Dim,Mode,Options>&
852 Transform<Scalar,Dim,Mode,Options>::pretranslate(const MatrixBase<OtherDerived> &other)
881 Transform<Scalar,Dim,Mode,Options>&
882 Transform<Scalar,Dim,Mode,Options>::rotate(const RotationType& rotation)
897 Transform<Scalar,Dim,Mode,Options>&
898 Transform<Scalar,Dim,Mode,Options>::prerotate(const RotationType& rotation)
911 Transform<Scalar,Dim,Mode,Options>&
912 Transform<Scalar,Dim,Mode,Options>::shear(Scalar sx, Scalar sy)
927 Transform<Scalar,Dim,Mode,Options>&
928 Transform<Scalar,Dim,Mode,Options>::preshear(Scalar sx, Scalar sy)
941 inline Transform<Scalar,Dim,Mode,Options>& Transform<Scalar,Dim,Mode,Options>::operator=(const TranslationType& t)
950 inline Transform<Scalar,Dim,Mode,Options> Transform<Scalar,Dim,Mode,Options>::operator*(const TranslationType& t) const
952 Transform res = *this;
958 inline Transform<Scalar,Dim,Mode,Options>& Transform<Scalar,Dim,Mode,Options>::operator=(const UniformScaling<Scalar>& s)
968 inline Transform<Scalar,Dim,Mode,Options>& Transform<Scalar,Dim,Mode,Options>::operator=(const RotationBase<Derived,Dim>& r)
978 inline Transform<Scalar,Dim,Mode,Options> Transform<Scalar,Dim,Mode,Options>::operator*(const RotationBase<Derived,Dim>& r) const
980 Transform res = *this;
997 const typename Transform<Scalar,Dim,Mode,Options>::LinearMatrixType
998 Transform<Scalar,Dim,Mode,Options>::rotation() const
1019 void Transform<Scalar,Dim,Mode,Options>::computeRotationScaling(RotationMatrixType *rotation, ScalingMatrixType *scaling) const
1048 void Transform<Scalar,Dim,Mode,Options>::computeScalingRotation(ScalingMatrixType *scaling, RotationMatrixType *rotation) const
1069 Transform<Scalar,Dim,Mode,Options>&
1070 Transform<Scalar,Dim,Mode,Options>::fromPositionOrientationScale(const MatrixBase<PositionDerived> &position,
1123 Transform<Scalar,Dim,Mode,Options>
1124 Transform<Scalar,Dim,Mode,Options>::inverse(TransformTraits hint) const
1126 Transform res;
1129 internal::projective_transform_inverse<Transform>::run(*this, res);
1143 eigen_assert(false && "Invalid transform traits in Transform::Inverse");
1170 struct transform_take_affine_part<Transform<Scalar,Dim,AffineCompact, Options> > {
1171 typedef typename Transform<Scalar,Dim,AffineCompact,Options>::MatrixType MatrixType;
1183 static inline void run(Transform<typename Other::Scalar,Dim,Mode,Options> *transform, const Other& other)
1185 transform->linear() = other;
1186 transform->translation().setZero();
1187 transform->makeAffine();
1194 static inline void run(Transform<typename Other::Scalar,Dim,Mode,Options> *transform, const Other& other)
1196 transform->affine() = other;
1197 transform->makeAffine();
1204 static inline void run(Transform<typename Other::Scalar,Dim,Mode,Options> *transform, const Other& other)
1205 { transform->matrix() = other; }
1211 static inline void run(Transform<typename Other::Scalar,Dim,AffineCompact,Options> *transform, const Other& other)
1212 { transform->matrix() = other.template block<Dim,HDim>(0,0); }
1301 typedef Transform<typename Other::Scalar,Dim,Mode,Options> TransformType;
1303 typedef Transform<typename Other::Scalar,Dim,Projective,Options> ResultType;
1312 typedef Transform<typename Other::Scalar,Dim,AffineCompact,Options> TransformType;
1314 typedef Transform<typename Other::Scalar,Dim,Projective,Options> ResultType;
1328 typedef Transform<typename Other::Scalar,Dim,Mode,Options> TransformType;
1344 typedef Transform<typename Other::Scalar,Dim,AffineCompact,Options> TransformType;
1360 typedef Transform<typename Other::Scalar,Dim,Mode,Options> TransformType;
1375 *** Specializations of operator* with another Transform ***
1379 struct transform_transform_product_impl<Transform<Scalar,Dim,LhsMode,LhsOptions>,Transform<Scalar,Dim,RhsMode,RhsOptions>,false >
1382 typedef Transform<Scalar,Dim,LhsMode,LhsOptions> Lhs;
1383 typedef Transform<Scalar,Dim,RhsMode,RhsOptions> Rhs;
1384 typedef Transform<Scalar,Dim,ResultMode,LhsOptions> ResultType;
1396 struct transform_transform_product_impl<Transform<Scalar,Dim,LhsMode,LhsOptions>,Transform<Scalar,Dim,RhsMode,RhsOptions>,true >
1398 typedef Transform<Scalar,Dim,LhsMode,LhsOptions> Lhs;
1399 typedef Transform<Scalar,Dim,RhsMode,RhsOptions> Rhs;
1400 typedef Transform<Scalar,Dim,Projective> ResultType;
1408 struct transform_transform_product_impl<Transform<Scalar,Dim,AffineCompact,LhsOptions>,Transform<Scalar,Dim,Projective,RhsOptions>,true >
1410 typedef Transform<Scalar,Dim,AffineCompact,LhsOptions> Lhs;
1411 typedef Transform<Scalar,Dim,Projective,RhsOptions> Rhs;
1412 typedef Transform<Scalar,Dim,Projective> ResultType;
1423 struct transform_transform_product_impl<Transform<Scalar,Dim,Projective,LhsOptions>,Transform<Scalar,Dim,AffineCompact,RhsOptions>,true >
1425 typedef Transform<Scalar,Dim,Projective,LhsOptions> Lhs;
1426 typedef Transform<Scalar,Dim,AffineCompact,RhsOptions> Rhs;
1427 typedef Transform<Scalar,Dim,Projective> ResultType;