Lines Matching refs:Transform
19 template<typename Transform>
24 Dim = Transform::Dim,
25 HDim = Transform::HDim,
26 Mode = Transform::Mode,
67 struct traits<Transform<_Scalar,_Dim,_Mode,_Options> >
88 * \class Transform
105 * this class you have to think a Transform object as its internal
120 * However, unlike a plain matrix, the Transform class provides many features
122 * with any other transformations (Transform,Translation,RotationBase,DiagonalMatrix)
123 * and can be directly used to transform implicit homogeneous vectors. All these
128 * according to the nature of each terms. Likewise, when applying the transform
175 * The concatenation of a Transform object with any kind of other transformation
176 * always returns a Transform object.
184 * it is not possible to directly transform Dim vectors stored in a Dim x Dim matrix.
201 class Transform
245 /** The return type of the product between a diagonal matrix and a transform */
246 typedef Transform<Scalar,Dim,TransformTimeDiagonalMode> TransformTimeDiagonalReturnType;
256 EIGEN_DEVICE_FUNC inline Transform()
262 EIGEN_DEVICE_FUNC inline Transform(const Transform& other)
268 EIGEN_DEVICE_FUNC inline explicit Transform(const TranslationType& t)
273 EIGEN_DEVICE_FUNC inline explicit Transform(const UniformScaling<Scalar>& s)
279 EIGEN_DEVICE_FUNC inline explicit Transform(const RotationBase<Derived, Dim>& r)
285 EIGEN_DEVICE_FUNC inline Transform& operator=(const Transform& other)
288 typedef internal::transform_take_affine_part<Transform> take_affine_part;
292 EIGEN_DEVICE_FUNC inline explicit Transform(const EigenBase<OtherDerived>& other)
303 EIGEN_DEVICE_FUNC inline Transform& operator=(const EigenBase<OtherDerived>& other)
313 EIGEN_DEVICE_FUNC inline Transform(const Transform<Scalar,Dim,Mode,OtherOptions>& other)
321 EIGEN_DEVICE_FUNC inline Transform(const Transform<Scalar,Dim,OtherMode,OtherOptions>& other)
348 typedef typename Transform<Scalar,Dim,OtherMode,OtherOptions>::MatrixType OtherMatrixType;
362 EIGEN_DEVICE_FUNC Transform(const ReturnByValue<OtherDerived>& other)
369 EIGEN_DEVICE_FUNC Transform& operator=(const ReturnByValue<OtherDerived>& other)
376 inline Transform(const QMatrix& other);
377 inline Transform& operator=(const QMatrix& other);
379 inline Transform(const QTransform& other);
380 inline Transform& operator=(const QTransform& other);
414 /** \returns an expression of the product between the transform \c *this and a matrix expression \a other.
427 * If you want to interpret \a other as a linear or affine transformation, then first convert it to a Transform<> type,
440 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const typename internal::transform_right_product_impl<Transform, OtherDerived>::ResultType
442 { return internal::transform_right_product_impl<Transform, OtherDerived>::run(*this,other.derived()); }
444 /** \returns the product expression of a transformation matrix \a a times a transform \a b
453 operator * (const EigenBase<OtherDerived> &a, const Transform &b)
456 /** \returns The product expression of a transform \a a times a diagonal matrix \a b
459 * product results in a Transform of the same type (mode) as the lhs only if the lhs
460 * mode is no isometry. In that case, the returned transform is an affinity.
471 /** \returns The product expression of a diagonal matrix \a a times a transform \a b
474 * product results in a Transform of the same type (mode) as the lhs only if the lhs
475 * mode is no isometry. In that case, the returned transform is an affinity.
479 operator * (const DiagonalBase<DiagonalDerived> &a, const Transform &b)
490 EIGEN_DEVICE_FUNC inline Transform& operator*=(const EigenBase<OtherDerived>& other) { return *this = *this * other; }
493 EIGEN_DEVICE_FUNC inline const Transform operator * (const Transform& other) const
495 return internal::transform_transform_product_impl<Transform,Transform>::run(*this,other);
501 // error: template instantiation resulted in unexpected function type of "Eigen::Transform<double, 3, 32, 0>
502 // (const Eigen::Transform<double, 3, 2, 0> &) const"
504 // "Eigen::internal::transform_transform_product_impl<Eigen::Transform<double, 3, 32, 0>,
505 // Eigen::Transform<double, 3, Mode, Options>, <expression>>::ResultType (const Eigen::Transform<double, 3, Mode, Options> &) const")
509 typedef internal::transform_transform_product_impl<Transform,Transform<Scalar,Dim,OtherMode,OtherOptions> > ProductType;
517 operator * (const Transform<Scalar,Dim,OtherMode,OtherOptions>& other) const
525 EIGEN_DEVICE_FUNC inline typename internal::transform_transform_product_impl<Transform,Transform<Scalar,Dim,OtherMode,OtherOptions> >::ResultType
526 operator * (const Transform<Scalar,Dim,OtherMode,OtherOptions>& other) const
528 return internal::transform_transform_product_impl<Transform,Transform<Scalar,Dim,OtherMode,OtherOptions> >::run(*this,other);
537 * \todo In the future this function should be returning a Transform expression.
539 EIGEN_DEVICE_FUNC static const Transform Identity()
541 return Transform(MatrixType::Identity());
546 inline Transform& scale(const MatrixBase<OtherDerived> &other);
550 inline Transform& prescale(const MatrixBase<OtherDerived> &other);
552 EIGEN_DEVICE_FUNC inline Transform& scale(const Scalar& s);
553 EIGEN_DEVICE_FUNC inline Transform& prescale(const Scalar& s);
557 inline Transform& translate(const MatrixBase<OtherDerived> &other);
561 inline Transform& pretranslate(const MatrixBase<OtherDerived> &other);
565 inline Transform& rotate(const RotationType& rotation);
569 inline Transform& prerotate(const RotationType& rotation);
571 EIGEN_DEVICE_FUNC Transform& shear(const Scalar& sx, const Scalar& sy);
572 EIGEN_DEVICE_FUNC Transform& preshear(const Scalar& sx, const Scalar& sy);
574 EIGEN_DEVICE_FUNC inline Transform& operator=(const TranslationType& t);
577 inline Transform& operator*=(const TranslationType& t) { return translate(t.vector()); }
579 EIGEN_DEVICE_FUNC inline Transform operator*(const TranslationType& t) const;
582 inline Transform& operator=(const UniformScaling<Scalar>& t);
585 inline Transform& operator*=(const UniformScaling<Scalar>& s) { return scale(s.factor()); }
596 inline Transform& operator*=(const DiagonalMatrix<Scalar,Dim>& s) { linearExt() *= s; return *this; }
599 EIGEN_DEVICE_FUNC inline Transform& operator=(const RotationBase<Derived,Dim>& r);
601 EIGEN_DEVICE_FUNC inline Transform& operator*=(const RotationBase<Derived,Dim>& r) { return rotate(r.toRotationMatrix()); }
603 EIGEN_DEVICE_FUNC inline Transform operator*(const RotationBase<Derived,Dim>& r) const;
615 Transform& fromPositionOrientationScale(const MatrixBase<PositionDerived> &position,
619 inline Transform inverse(TransformTraits traits = (TransformTraits)Mode) const;
632 EIGEN_DEVICE_FUNC inline typename internal::cast_return_type<Transform,Transform<NewScalarType,Dim,Mode,Options> >::type cast() const
633 { return typename internal::cast_return_type<Transform,Transform<NewScalarType,Dim,Mode,Options> >::type(*this); }
637 EIGEN_DEVICE_FUNC inline explicit Transform(const Transform<OtherScalarType,Dim,Mode,Options>& other)
647 EIGEN_DEVICE_FUNC bool isApprox(const Transform& other, const typename NumTraits<Scalar>::Real& prec = NumTraits<Scalar>::dummy_precision()) const
699 typedef Transform<float,2,Isometry> Isometry2f;
701 typedef Transform<float,3,Isometry> Isometry3f;
703 typedef Transform<double,2,Isometry> Isometry2d;
705 typedef Transform<double,3,Isometry> Isometry3d;
708 typedef Transform<float,2,Affine> Affine2f;
710 typedef Transform<float,3,Affine> Affine3f;
712 typedef Transform<double,2,Affine> Affine2d;
714 typedef Transform<double,3,Affine> Affine3d;
717 typedef Transform<float,2,AffineCompact> AffineCompact2f;
719 typedef Transform<float,3,AffineCompact> AffineCompact3f;
721 typedef Transform<double,2,AffineCompact> AffineCompact2d;
723 typedef Transform<double,3,AffineCompact> AffineCompact3d;
726 typedef Transform<float,2,Projective> Projective2f;
728 typedef Transform<float,3,Projective> Projective3f;
730 typedef Transform<double,2,Projective> Projective2d;
732 typedef Transform<double,3,Projective> Projective3d;
744 Transform<Scalar,Dim,Mode,Options>::Transform(const QMatrix& other)
755 Transform<Scalar,Dim,Mode,Options>& Transform<Scalar,Dim,Mode,Options>::operator=(const QMatrix& other)
775 QMatrix Transform<Scalar,Dim,Mode,Options>::toQMatrix(void) const
789 TransformTransform(const QTransform& other)
800 Transform<Scalar,Dim,Mode,Options>& Transform<Scalar,Dim,Mode,Options>::operator=(const QTransform& other)
819 QTransform Transform<Scalar,Dim,Mode,Options>::toQTransform(void) const
843 EIGEN_DEVICE_FUNC Transform<Scalar,Dim,Mode,Options>&
844 Transform<Scalar,Dim,Mode,Options>::scale(const MatrixBase<OtherDerived> &other)
857 EIGEN_DEVICE_FUNC inline Transform<Scalar,Dim,Mode,Options>& Transform<Scalar,Dim,Mode,Options>::scale(const Scalar& s)
870 EIGEN_DEVICE_FUNC Transform<Scalar,Dim,Mode,Options>&
871 Transform<Scalar,Dim,Mode,Options>::prescale(const MatrixBase<OtherDerived> &other)
884 EIGEN_DEVICE_FUNC inline Transform<Scalar,Dim,Mode,Options>& Transform<Scalar,Dim,Mode,Options>::prescale(const Scalar& s)
897 EIGEN_DEVICE_FUNC Transform<Scalar,Dim,Mode,Options>&
898 Transform<Scalar,Dim,Mode,Options>::translate(const MatrixBase<OtherDerived> &other)
911 EIGEN_DEVICE_FUNC Transform<Scalar,Dim,Mode,Options>&
912 Transform<Scalar,Dim,Mode,Options>::pretranslate(const MatrixBase<OtherDerived> &other)
941 EIGEN_DEVICE_FUNC Transform<Scalar,Dim,Mode,Options>&
942 Transform<Scalar,Dim,Mode,Options>::rotate(const RotationType& rotation)
957 EIGEN_DEVICE_FUNC Transform<Scalar,Dim,Mode,Options>&
958 Transform<Scalar,Dim,Mode,Options>::prerotate(const RotationType& rotation)
971 EIGEN_DEVICE_FUNC Transform<Scalar,Dim,Mode,Options>&
972 Transform<Scalar,Dim,Mode,Options>::shear(const Scalar& sx, const Scalar& sy)
987 EIGEN_DEVICE_FUNC Transform<Scalar,Dim,Mode,Options>&
988 Transform<Scalar,Dim,Mode,Options>::preshear(const Scalar& sx, const Scalar& sy)
1001 EIGEN_DEVICE_FUNC inline Transform<Scalar,Dim,Mode,Options>& Transform<Scalar,Dim,Mode,Options>::operator=(const TranslationType& t)
1010 EIGEN_DEVICE_FUNC inline Transform<Scalar,Dim,Mode,Options> Transform<Scalar,Dim,Mode,Options>::operator*(const TranslationType& t) const
1012 Transform res = *this;
1018 EIGEN_DEVICE_FUNC inline Transform<Scalar,Dim,Mode,Options>& Transform<Scalar,Dim,Mode,Options>::operator=(const UniformScaling<Scalar>& s)
1028 EIGEN_DEVICE_FUNC inline Transform<Scalar,Dim,Mode,Options>& Transform<Scalar,Dim,Mode,Options>::operator=(const RotationBase<Derived,Dim>& r)
1038 EIGEN_DEVICE_FUNC inline Transform<Scalar,Dim,Mode,Options> Transform<Scalar,Dim,Mode,Options>::operator*(const RotationBase<Derived,Dim>& r) const
1040 Transform res = *this;
1057 EIGEN_DEVICE_FUNC const typename Transform<Scalar,Dim,Mode,Options>::LinearMatrixType
1058 Transform<Scalar,Dim,Mode,Options>::rotation() const
1079 EIGEN_DEVICE_FUNC void Transform<Scalar,Dim,Mode,Options>::computeRotationScaling(RotationMatrixType *rotation, ScalingMatrixType *scaling) const
1108 EIGEN_DEVICE_FUNC void Transform<Scalar,Dim,Mode,Options>::computeScalingRotation(ScalingMatrixType *scaling, RotationMatrixType *rotation) const
1129 EIGEN_DEVICE_FUNC Transform<Scalar,Dim,Mode,Options>&
1130 Transform<Scalar,Dim,Mode,Options>::fromPositionOrientationScale(const MatrixBase<PositionDerived> &position,
1201 EIGEN_DEVICE_FUNC Transform<Scalar,Dim,Mode,Options>
1202 Transform<Scalar,Dim,Mode,Options>::inverse(TransformTraits hint) const
1204 Transform res;
1207 internal::projective_transform_inverse<Transform>::run(*this, res);
1221 eigen_assert(false && "Invalid transform traits in Transform::Inverse");
1248 struct transform_take_affine_part<Transform<Scalar,Dim,AffineCompact, Options> > {
1249 typedef typename Transform<Scalar,Dim,AffineCompact,Options>::MatrixType MatrixType;
1261 static inline void run(Transform<typename Other::Scalar,Dim,Mode,Options> *transform, const Other& other)
1263 transform->linear() = other;
1264 transform->translation().setZero();
1265 transform->makeAffine();
1272 static inline void run(Transform<typename Other::Scalar,Dim,Mode,Options> *transform, const Other& other)
1274 transform->affine() = other;
1275 transform->makeAffine();
1282 static inline void run(Transform<typename Other::Scalar,Dim,Mode,Options> *transform, const Other& other)
1283 { transform->matrix() = other; }
1289 static inline void run(Transform<typename Other::Scalar,Dim,AffineCompact,Options> *transform, const Other& other)
1290 { transform->matrix() = other.template block<Dim,HDim>(0,0); }
1403 typedef Transform<typename Other::Scalar,Dim,Mode,Options> TransformType;
1405 typedef Transform<typename Other::Scalar,Dim,Projective,Options> ResultType;
1414 typedef Transform<typename Other::Scalar,Dim,AffineCompact,Options> TransformType;
1416 typedef Transform<typename Other::Scalar,Dim,Projective,Options> ResultType;
1430 typedef Transform<typename Other::Scalar,Dim,Mode,Options> TransformType;
1446 typedef Transform<typename Other::Scalar,Dim,AffineCompact,Options> TransformType;
1462 typedef Transform<typename Other::Scalar,Dim,Mode,Options> TransformType;
1477 *** Specializations of operator* with another Transform ***
1481 struct transform_transform_product_impl<Transform<Scalar,Dim,LhsMode,LhsOptions>,Transform<Scalar,Dim,RhsMode,RhsOptions>,false >
1484 typedef Transform<Scalar,Dim,LhsMode,LhsOptions> Lhs;
1485 typedef Transform<Scalar,Dim,RhsMode,RhsOptions> Rhs;
1486 typedef Transform<Scalar,Dim,ResultMode,LhsOptions> ResultType;
1498 struct transform_transform_product_impl<Transform<Scalar,Dim,LhsMode,LhsOptions>,Transform<Scalar,Dim,RhsMode,RhsOptions>,true >
1500 typedef Transform<Scalar,Dim,LhsMode,LhsOptions> Lhs;
1501 typedef Transform<Scalar,Dim,RhsMode,RhsOptions> Rhs;
1502 typedef Transform<Scalar,Dim,Projective> ResultType;
1510 struct transform_transform_product_impl<Transform<Scalar,Dim,AffineCompact,LhsOptions>,Transform<Scalar,Dim,Projective,RhsOptions>,true >
1512 typedef Transform<Scalar,Dim,AffineCompact,LhsOptions> Lhs;
1513 typedef Transform<Scalar,Dim,Projective,RhsOptions> Rhs;
1514 typedef Transform<Scalar,Dim,Projective> ResultType;
1525 struct transform_transform_product_impl<Transform<Scalar,Dim,Projective,LhsOptions>,Transform<Scalar,Dim,AffineCompact,RhsOptions>,true >
1527 typedef Transform<Scalar,Dim,Projective,LhsOptions> Lhs;
1528 typedef Transform<Scalar,Dim,AffineCompact,RhsOptions> Rhs;
1529 typedef Transform<Scalar,Dim,Projective> ResultType;