18 template<
typename Other,
21 int OtherRows=Other::RowsAtCompileTime,
22 int OtherCols=Other::ColsAtCompileTime>
42 template<
typename _Scalar,
int _Dim>
86 inline explicit Transform(
const TranslationType& t) { *
this = t; }
87 inline explicit Transform(
const ScalingType& s) { *
this = s; }
88 template<
typename Derived>
92 { m_matrix = other.
m_matrix;
return *
this; }
94 template<
typename OtherDerived,
bool BigMatrix>
99 transform->
matrix() = other;
107 transform->
linear() = other;
115 template<
typename OtherDerived>
122 template<
typename OtherDerived>
124 { m_matrix = other;
return *
this; }
126 #ifdef EIGEN_QT_SUPPORT 129 inline QMatrix toQMatrix(
void)
const;
130 inline Transform(
const QTransform& other);
132 inline QTransform toQTransform(
void)
const;
148 inline ConstLinearPart
linear()
const {
return m_matrix.template block<Dim,Dim>(0,0); }
150 inline LinearPart
linear() {
return m_matrix.template block<Dim,Dim>(0,0); }
153 inline ConstTranslationPart
translation()
const {
return m_matrix.template block<Dim,1>(0,Dim); }
155 inline TranslationPart
translation() {
return m_matrix.template block<Dim,1>(0,Dim); }
165 template<
typename OtherDerived>
172 template<
typename OtherDerived>
175 {
return a.derived() * b.
matrix(); }
184 static const typename MatrixType::IdentityReturnType
Identity()
186 return MatrixType::Identity();
189 template<
typename OtherDerived>
192 template<
typename OtherDerived>
198 template<
typename OtherDerived>
201 template<
typename OtherDerived>
204 template<
typename RotationType>
207 template<
typename RotationType>
224 res.
matrix().template block<Dim,HDim>(0,0) = (mat * t.
matrix().template block<Dim,HDim>(0,0)).lazy();
228 template<
typename Derived>
230 template<
typename Derived>
232 template<
typename Derived>
236 template<
typename RotationMatrixType,
typename ScalingMatrixType>
238 template<
typename ScalingMatrixType,
typename RotationMatrixType>
241 template<
typename PositionDerived,
typename OrientationType,
typename ScaleDerived>
248 const Scalar*
data()
const {
return m_matrix.
data(); }
257 template<
typename NewScalarType>
262 template<
typename OtherScalarType>
264 { m_matrix = other.
matrix().template cast<Scalar>(); }
271 {
return m_matrix.isApprox(other.
m_matrix, prec); }
273 #ifdef EIGEN_TRANSFORM_PLUGIN 274 #include EIGEN_TRANSFORM_PLUGIN 294 #ifdef EIGEN_QT_SUPPORT 299 template<
typename Scalar,
int Dim>
309 template<
typename Scalar,
int Dim>
313 m_matrix << other.m11(), other.m21(), other.dx(),
314 other.m12(), other.m22(), other.dy(),
325 template<
typename Scalar,
int Dim>
329 return QMatrix(m_matrix.
coeff(0,0), m_matrix.
coeff(1,0),
338 template<
typename Scalar,
int Dim>
348 template<
typename Scalar,
int Dim>
352 m_matrix << other.m11(), other.m21(), other.dx(),
353 other.m12(), other.m22(), other.dy(),
354 other.m13(), other.m23(), other.m33();
362 template<
typename Scalar,
int Dim>
366 return QTransform(m_matrix.
coeff(0,0), m_matrix.
coeff(1,0), m_matrix.
coeff(2,0),
380 template<
typename Scalar,
int Dim>
381 template<
typename OtherDerived>
394 template<
typename Scalar,
int Dim>
405 template<
typename Scalar,
int Dim>
406 template<
typename OtherDerived>
411 m_matrix.template block<Dim,HDim>(0,0) = (other.
asDiagonal() * m_matrix.template block<Dim,HDim>(0,0)).lazy();
419 template<
typename Scalar,
int Dim>
422 m_matrix.template corner<Dim,HDim>(
TopLeft) *= s;
430 template<
typename Scalar,
int Dim>
431 template<
typename OtherDerived>
444 template<
typename Scalar,
int Dim>
445 template<
typename OtherDerived>
471 template<
typename Scalar,
int Dim>
472 template<
typename RotationType>
487 template<
typename Scalar,
int Dim>
488 template<
typename RotationType>
492 m_matrix.template block<Dim,HDim>(0,0) = ei_toRotationMatrix<Scalar,Dim>(rotation)
493 * m_matrix.template block<Dim,HDim>(0,0);
502 template<
typename Scalar,
int Dim>
517 template<
typename Scalar,
int Dim>
522 m_matrix.template block<Dim,HDim>(0,0) =
LinearMatrixType(1, sx, sy, 1) * m_matrix.template block<Dim,HDim>(0,0);
530 template<
typename Scalar,
int Dim>
535 m_matrix.template block<1,Dim>(Dim,0).
setZero();
540 template<
typename Scalar,
int Dim>
548 template<
typename Scalar,
int Dim>
557 template<
typename Scalar,
int Dim>
565 template<
typename Scalar,
int Dim>
566 template<
typename Derived>
569 linear() = ei_toRotationMatrix<Scalar,Dim>(r);
571 m_matrix.template block<1,Dim>(Dim,0).
setZero();
576 template<
typename Scalar,
int Dim>
577 template<
typename Derived>
596 template<
typename Scalar,
int Dim>
600 LinearMatrixType result;
617 template<
typename Scalar,
int Dim>
618 template<
typename RotationMatrixType,
typename ScalingMatrixType>
627 scaling->noalias() = svd.
matrixV() * sv.asDiagonal() * svd.
matrixV().adjoint();
631 LinearMatrixType m(svd.
matrixU());
633 rotation->noalias() = m * svd.
matrixV().adjoint();
648 template<
typename Scalar,
int Dim>
649 template<
typename ScalingMatrixType,
typename RotationMatrixType>
658 scaling->noalias() = svd.
matrixU() * sv.asDiagonal() * svd.
matrixU().adjoint();
662 LinearMatrixType m(svd.
matrixU());
664 rotation->noalias() = m * svd.
matrixV().adjoint();
671 template<
typename Scalar,
int Dim>
672 template<
typename PositionDerived,
typename OrientationType,
typename ScaleDerived>
677 linear() = ei_toRotationMatrix<Scalar,Dim>(orientation);
680 m_matrix.template block<1,Dim>(Dim,0).
setZero();
704 template<
typename Scalar,
int Dim>
710 return m_matrix.inverse();
721 res.template corner<Dim,Dim>(
TopLeft) =
linear().transpose();
725 ei_assert(
"invalid traits value in Transform::inverse()");
739 template<
typename Other,
int Dim,
int HDim>
745 static ResultType
run(
const TransformType& tr,
const Other& other)
746 {
return tr.
matrix() * other; }
749 template<
typename Other,
int Dim,
int HDim>
755 static ResultType
run(
const TransformType& tr,
const Other& other)
765 template<
typename Other,
int Dim,
int HDim>
771 static ResultType
run(
const TransformType& tr,
const Other& other)
772 {
return tr.
matrix() * other; }
775 template<
typename Other,
int Dim,
int HDim>
781 static ResultType
run(
const TransformType& tr,
const Other& other)
Expression of the product of two general matrices or vectors.
Represents a possibly non uniform scaling transformation.
const VectorType & vector() const
Holds information about the various numeric (i.e. scalar) types allowed by Eigen. ...
#define EIGEN_STATIC_ASSERT(CONDITION, MSG)
const SingularValuesType & singularValues() const
Represents a translation transformation.
Transform< float, 2 > Transform2f
const VectorType & coeffs() const
EIGEN_STRONG_INLINE const Scalar & coeff(Index rowId, Index colId) const
EIGEN_STRONG_INLINE Scalar & coeffRef(Index rowId, Index colId)
Common base class for compact rotation representations.
TFSIMD_FORCE_INLINE const tfScalar & x() const
Transform< float, 3 > Transform3f
Derived & setZero(Index size)
EIGEN_STRONG_INLINE const Scalar * data() const
Expression of a fixed-size or dynamic-size block.
Two-sided Jacobi SVD decomposition of a rectangular matrix.
const Derived & derived() const
const MatrixUType & matrixU() const
const DiagonalWrapper< const Derived > asDiagonal() const
Transform< double, 2 > Transform2d
Base class for all dense matrices, vectors, and expressions.
const MatrixVType & matrixV() const
RotationMatrixType toRotationMatrix() const
#define EIGEN_STATIC_ASSERT_VECTOR_SPECIFIC_SIZE(TYPE, SIZE)
Transform< double, 3 > Transform3d