27 #ifndef EIGEN_TRANSFORM_H
28 #define EIGEN_TRANSFORM_H
34 template<
typename Transform>
35 struct transform_traits
40 HDim = Transform::HDim,
41 Mode = Transform::Mode,
46 template<
typename TransformType,
48 int Case = transform_traits<TransformType>::IsProjective ? 0
49 :
int(MatrixType::RowsAtCompileTime) ==
int(transform_traits<TransformType>::HDim) ? 1
51 struct transform_right_product_impl;
53 template<
typename Other,
58 int OtherRows=Other::RowsAtCompileTime,
59 int OtherCols=Other::ColsAtCompileTime>
60 struct transform_left_product_impl;
62 template<
typename Lhs,
65 transform_traits<Lhs>::IsProjective ||
66 transform_traits<Rhs>::IsProjective>
67 struct transform_transform_product_impl;
69 template<
typename Other,
74 int OtherRows=Other::RowsAtCompileTime,
75 int OtherCols=Other::ColsAtCompileTime>
76 struct transform_construct_from_matrix;
78 template<
typename TransformType>
struct transform_take_affine_part;
190 template<
typename _Scalar,
int _Dim,
int _Mode,
int _Options>
247 check_template_params();
254 check_template_params();
260 check_template_params();
265 check_template_params();
268 template<
typename Derived>
271 check_template_params();
276 { m_matrix = other.
m_matrix;
return *
this; }
281 template<
typename OtherDerived>
285 YOU_MIXED_DIFFERENT_NUMERIC_TYPES__YOU_NEED_TO_USE_THE_CAST_METHOD_OF_MATRIXBASE_TO_CAST_NUMERIC_TYPES_EXPLICITLY);
287 check_template_params();
288 internal::transform_construct_from_matrix<OtherDerived,Mode,Options,Dim,HDim>::run(
this, other.
derived());
292 template<
typename OtherDerived>
296 YOU_MIXED_DIFFERENT_NUMERIC_TYPES__YOU_NEED_TO_USE_THE_CAST_METHOD_OF_MATRIXBASE_TO_CAST_NUMERIC_TYPES_EXPLICITLY);
298 internal::transform_construct_from_matrix<OtherDerived,Mode,Options,Dim,HDim>::run(
this, other.
derived());
302 template<
int OtherOptions>
305 check_template_params();
307 m_matrix = other.
matrix();
310 template<
int OtherMode,
int OtherOptions>
313 check_template_params();
317 YOU_PERFORMED_AN_INVALID_TRANSFORMATION_CONVERSION)
322 YOU_PERFORMED_AN_INVALID_TRANSFORMATION_CONVERSION)
328 if(ModeIsAffineCompact == OtherModeIsAffineCompact)
333 m_matrix.template block<Dim,Dim+1>(0,0) = other.
matrix().template block<Dim,Dim+1>(0,0);
336 else if(OtherModeIsAffineCompact)
339 internal::transform_construct_from_matrix<OtherMatrixType,Mode,Options,Dim,HDim>::run(
this, other.
matrix());
346 linear() = other.
linear();
351 template<
typename OtherDerived>
354 check_template_params();
358 template<
typename OtherDerived>
365 #ifdef EIGEN_QT_SUPPORT
367 inline Transform& operator=(
const QMatrix& other);
368 inline QMatrix toQMatrix(
void)
const;
369 inline Transform(
const QTransform& other);
370 inline Transform& operator=(
const QTransform& other);
371 inline QTransform toQTransform(
void)
const;
376 inline Scalar operator() (Index
row, Index
col)
const {
return m_matrix(row,col); }
379 inline Scalar& operator() (Index
row, Index
col) {
return m_matrix(row,col); }
382 inline const MatrixType&
matrix()
const {
return m_matrix; }
384 inline MatrixType&
matrix() {
return m_matrix; }
387 inline ConstLinearPart
linear()
const {
return ConstLinearPart(m_matrix,0,0); }
389 inline LinearPart
linear() {
return LinearPart(m_matrix,0,0); }
392 inline ConstAffinePart
affine()
const {
return take_affine_part::run(m_matrix); }
394 inline AffinePart
affine() {
return take_affine_part::run(m_matrix); }
397 inline ConstTranslationPart
translation()
const {
return ConstTranslationPart(m_matrix,0,Dim); }
399 inline TranslationPart
translation() {
return TranslationPart(m_matrix,0,Dim); }
413 template<
typename OtherDerived>
414 EIGEN_STRONG_INLINE const typename internal::transform_right_product_impl<Transform, OtherDerived>::ResultType
416 {
return internal::transform_right_product_impl<Transform, OtherDerived>::run(*
this,other.
derived()); }
425 template<
typename OtherDerived>
friend
426 inline const typename internal::transform_left_product_impl<OtherDerived,Mode,Options,_Dim,_Dim+1>::ResultType
428 {
return internal::transform_left_product_impl<OtherDerived,Mode,Options,Dim,HDim>::run(a.
derived(),b); }
436 template<
typename DiagonalDerived>
437 inline const TransformTimeDiagonalReturnType
440 TransformTimeDiagonalReturnType res(*
this);
451 template<
typename DiagonalDerived>
452 friend inline TransformTimeDiagonalReturnType
455 TransformTimeDiagonalReturnType res;
463 template<
typename OtherDerived>
469 return internal::transform_transform_product_impl<Transform,Transform>::run(*
this,other);
473 template<
int OtherMode,
int OtherOptions>
474 inline const typename internal::transform_transform_product_impl<
478 return internal::transform_transform_product_impl<Transform,Transform<Scalar,Dim,OtherMode,OtherOptions> >::run(*
this,other);
488 static const Transform Identity()
490 return Transform(MatrixType::Identity());
493 template<
typename OtherDerived>
496 template<
typename OtherDerived>
499 inline Transform& scale(Scalar s);
500 inline Transform& prescale(Scalar s);
502 template<
typename OtherDerived>
505 template<
typename OtherDerived>
508 template<
typename RotationType>
509 inline Transform& rotate(
const RotationType& rotation);
511 template<
typename RotationType>
512 inline Transform& prerotate(
const RotationType& rotation);
514 Transform& shear(Scalar sx, Scalar sy);
515 Transform& preshear(Scalar sx, Scalar sy);
517 inline Transform& operator=(
const TranslationType& t);
519 inline Transform
operator*(
const TranslationType& t)
const;
527 template<
typename Derived>
529 template<
typename Derived>
531 template<
typename Derived>
534 const LinearMatrixType rotation()
const;
535 template<
typename RotationMatrixType,
typename ScalingMatrixType>
536 void computeRotationScaling(RotationMatrixType *rotation, ScalingMatrixType *scaling)
const;
537 template<
typename ScalingMatrixType,
typename RotationMatrixType>
538 void computeScalingRotation(ScalingMatrixType *scaling, RotationMatrixType *rotation)
const;
540 template<
typename PositionDerived,
typename OrientationType,
typename ScaleDerived>
547 const Scalar*
data()
const {
return m_matrix.
data(); }
556 template<
typename NewScalarType>
557 inline typename internal::cast_return_type<Transform,Transform<NewScalarType,Dim,Mode,Options> >::type
cast()
const
558 {
return typename internal::cast_return_type<Transform,Transform<NewScalarType,Dim,Mode,Options> >::type(*
this); }
561 template<
typename OtherScalarType>
564 check_template_params();
565 m_matrix = other.
matrix().template cast<Scalar>();
581 matrix().template block<1,Dim>(Dim,0).setZero();
582 matrix().coeffRef(Dim,Dim) = 1;
591 {
return m_matrix.template block<int(Mode)==int(Projective)?HDim:Dim,Dim>(0,0); }
597 {
return m_matrix.template block<int(Mode)==int(Projective)?HDim:Dim,Dim>(0,0); }
604 {
return m_matrix.template block<int(Mode)==int(Projective)?HDim:Dim,1>(0,Dim); }
610 {
return m_matrix.template block<int(Mode)==int(Projective)?HDim:Dim,1>(0,Dim); }
613 #ifdef EIGEN_TRANSFORM_PLUGIN
614 #include EIGEN_TRANSFORM_PLUGIN
618 #ifndef EIGEN_PARSED_BY_DOXYGEN
667 #ifdef EIGEN_QT_SUPPORT
672 template<
typename Scalar,
int Dim,
int Mode,
int Options>
675 check_template_params();
683 template<
typename Scalar,
int Dim,
int Mode,
int Options>
687 m_matrix << other.m11(), other.m21(), other.dx(),
688 other.m12(), other.m22(), other.dy(),
699 template<
typename Scalar,
int Dim,
int Mode,
int Options>
702 check_template_params();
704 return QMatrix(m_matrix.
coeff(0,0), m_matrix.
coeff(1,0),
713 template<
typename Scalar,
int Dim,
int Mode,
int Options>
716 check_template_params();
724 template<
typename Scalar,
int Dim,
int Mode,
int Options>
727 check_template_params();
730 m_matrix << other.m11(), other.m21(), other.dx(),
731 other.m12(), other.m22(), other.dy();
733 m_matrix << other.m11(), other.m21(), other.dx(),
734 other.m12(), other.m22(), other.dy(),
735 other.m13(), other.m23(), other.m33();
743 template<
typename Scalar,
int Dim,
int Mode,
int Options>
748 return QTransform(m_matrix.
coeff(0,0), m_matrix.
coeff(1,0),
752 return QTransform(m_matrix.
coeff(0,0), m_matrix.
coeff(1,0), m_matrix.
coeff(2,0),
766 template<
typename Scalar,
int Dim,
int Mode,
int Options>
767 template<
typename OtherDerived>
773 linearExt().noalias() = (linearExt() * other.
asDiagonal());
781 template<
typename Scalar,
int Dim,
int Mode,
int Options>
793 template<
typename Scalar,
int Dim,
int Mode,
int Options>
794 template<
typename OtherDerived>
800 m_matrix.template block<Dim,HDim>(0,0).noalias() = (other.
asDiagonal() * m_matrix.template block<Dim,HDim>(0,0));
808 template<
typename Scalar,
int Dim,
int Mode,
int Options>
812 m_matrix.template topRows<Dim>() *= s;
820 template<
typename Scalar,
int Dim,
int Mode,
int Options>
821 template<
typename OtherDerived>
826 translationExt() += linearExt() * other;
834 template<
typename Scalar,
int Dim,
int Mode,
int Options>
835 template<
typename OtherDerived>
841 affine() += other * m_matrix.
row(Dim);
843 translation() += other;
864 template<
typename Scalar,
int Dim,
int Mode,
int Options>
865 template<
typename RotationType>
869 linearExt() *= internal::toRotationMatrix<Scalar,Dim>(rotation);
880 template<
typename Scalar,
int Dim,
int Mode,
int Options>
881 template<
typename RotationType>
885 m_matrix.template block<Dim,HDim>(0,0) = internal::toRotationMatrix<Scalar,Dim>(rotation)
886 * m_matrix.template block<Dim,HDim>(0,0);
895 template<
typename Scalar,
int Dim,
int Mode,
int Options>
901 VectorType tmp = linear().col(0)*sy + linear().col(1);
902 linear() << linear().col(0) + linear().col(1)*sx, tmp;
911 template<
typename Scalar,
int Dim,
int Mode,
int Options>
917 m_matrix.template block<Dim,HDim>(0,0) = LinearMatrixType(1, sx, sy, 1) * m_matrix.template block<Dim,HDim>(0,0);
925 template<
typename Scalar,
int Dim,
int Mode,
int Options>
929 translation() = t.
vector();
934 template<
typename Scalar,
int Dim,
int Mode,
int Options>
937 Transform res = *
this;
942 template<
typename Scalar,
int Dim,
int Mode,
int Options>
946 linear().diagonal().fill(s.
factor());
951 template<
typename Scalar,
int Dim,
int Mode,
int Options>
954 Transform res = *
this;
959 template<
typename Scalar,
int Dim,
int Mode,
int Options>
960 template<
typename Derived>
963 linear() = internal::toRotationMatrix<Scalar,Dim>(r);
964 translation().setZero();
969 template<
typename Scalar,
int Dim,
int Mode,
int Options>
970 template<
typename Derived>
973 Transform res = *
this;
989 template<
typename Scalar,
int Dim,
int Mode,
int Options>
993 LinearMatrixType result;
994 computeRotationScaling(&result, (LinearMatrixType*)0);
1010 template<
typename Scalar,
int Dim,
int Mode,
int Options>
1011 template<
typename RotationMatrixType,
typename ScalingMatrixType>
1016 Scalar x = (svd.
matrixU() * svd.
matrixV().adjoint()).determinant();
1018 sv.coeffRef(0) *= x;
1019 if(scaling) scaling->lazyAssign(svd.
matrixV() * sv.asDiagonal() * svd.
matrixV().adjoint());
1022 LinearMatrixType m(svd.
matrixU());
1024 rotation->lazyAssign(m * svd.
matrixV().adjoint());
1039 template<
typename Scalar,
int Dim,
int Mode,
int Options>
1040 template<
typename ScalingMatrixType,
typename RotationMatrixType>
1045 Scalar x = (svd.
matrixU() * svd.
matrixV().adjoint()).determinant();
1047 sv.coeffRef(0) *= x;
1048 if(scaling) scaling->lazyAssign(svd.
matrixU() * sv.asDiagonal() * svd.
matrixU().adjoint());
1051 LinearMatrixType m(svd.
matrixU());
1053 rotation->lazyAssign(m * svd.
matrixV().adjoint());
1060 template<
typename Scalar,
int Dim,
int Mode,
int Options>
1061 template<
typename PositionDerived,
typename OrientationType,
typename ScaleDerived>
1066 linear() = internal::toRotationMatrix<Scalar,Dim>(orientation);
1068 translation() = position;
1073 namespace internal {
1076 template<
typename TransformType,
int Mode=TransformType::Mode>
1077 struct projective_transform_inverse
1079 static inline void run(
const TransformType&, TransformType&)
1083 template<
typename TransformType>
1084 struct projective_transform_inverse<TransformType,
Projective>
1086 static inline void run(
const TransformType& m, TransformType& res)
1088 res.matrix() = m.matrix().inverse();
1115 template<
typename Scalar,
int Dim,
int Mode,
int Options>
1116 Transform<Scalar,Dim,Mode,Options>
1122 internal::projective_transform_inverse<Transform>::run(*
this, res);
1128 res.
matrix().template topLeftCorner<Dim,Dim>() = linear().
transpose();
1132 res.
matrix().template topLeftCorner<Dim,Dim>() = linear().
inverse();
1136 eigen_assert(
false &&
"Invalid transform traits in Transform::Inverse");
1139 res.
matrix().template topRightCorner<Dim,1>()
1140 = - res.
matrix().template topLeftCorner<Dim,Dim>() * translation();
1146 namespace internal {
1152 template<
typename TransformType>
struct transform_take_affine_part {
1153 typedef typename TransformType::MatrixType MatrixType;
1154 typedef typename TransformType::AffinePart AffinePart;
1155 typedef typename TransformType::ConstAffinePart ConstAffinePart;
1156 static inline AffinePart run(MatrixType& m)
1157 {
return m.template block<TransformType::Dim,TransformType::HDim>(0,0); }
1158 static inline ConstAffinePart run(
const MatrixType& m)
1159 {
return m.template block<TransformType::Dim,TransformType::HDim>(0,0); }
1162 template<
typename Scalar,
int Dim,
int Options>
1163 struct transform_take_affine_part<Transform<Scalar,Dim,
AffineCompact, Options> > {
1164 typedef typename Transform<Scalar,Dim,AffineCompact,Options>::MatrixType MatrixType;
1165 static inline MatrixType& run(MatrixType& m) {
return m; }
1166 static inline const MatrixType& run(
const MatrixType& m) {
return m; }
1173 template<
typename Other,
int Mode,
int Options,
int Dim,
int HDim>
1174 struct transform_construct_from_matrix<Other, Mode,Options,Dim,HDim, Dim,Dim>
1176 static inline void run(Transform<typename Other::Scalar,Dim,Mode,Options> *transform,
const Other& other)
1178 transform->linear() = other;
1179 transform->translation().setZero();
1180 transform->makeAffine();
1184 template<
typename Other,
int Mode,
int Options,
int Dim,
int HDim>
1185 struct transform_construct_from_matrix<Other, Mode,Options,Dim,HDim, Dim,HDim>
1187 static inline void run(Transform<typename Other::Scalar,Dim,Mode,Options> *transform,
const Other& other)
1189 transform->affine() = other;
1190 transform->makeAffine();
1194 template<
typename Other,
int Mode,
int Options,
int Dim,
int HDim>
1195 struct transform_construct_from_matrix<Other, Mode,Options,Dim,HDim, HDim,HDim>
1197 static inline void run(Transform<typename Other::Scalar,Dim,Mode,Options> *transform,
const Other& other)
1198 { transform->matrix() = other; }
1201 template<
typename Other,
int Options,
int Dim,
int HDim>
1202 struct transform_construct_from_matrix<Other,
AffineCompact,Options,Dim,HDim, HDim,HDim>
1204 static inline void run(Transform<typename Other::Scalar,Dim,AffineCompact,Options> *transform,
const Other& other)
1205 { transform->matrix() = other.template block<Dim,HDim>(0,0); }
1212 template<
int LhsMode,
int RhsMode>
1213 struct transform_product_result
1225 template<
typename TransformType,
typename MatrixType >
1226 struct transform_right_product_impl< TransformType, MatrixType, 0 >
1228 typedef typename MatrixType::PlainObject ResultType;
1230 static EIGEN_STRONG_INLINE ResultType run(
const TransformType& T,
const MatrixType& other)
1232 return T.matrix() * other;
1236 template<
typename TransformType,
typename MatrixType >
1237 struct transform_right_product_impl< TransformType, MatrixType, 1 >
1240 Dim = TransformType::Dim,
1241 HDim = TransformType::HDim,
1242 OtherRows = MatrixType::RowsAtCompileTime,
1243 OtherCols = MatrixType::ColsAtCompileTime
1246 typedef typename MatrixType::PlainObject ResultType;
1248 static EIGEN_STRONG_INLINE ResultType run(
const TransformType& T,
const MatrixType& other)
1252 typedef Block<ResultType, Dim, OtherCols, int(MatrixType::RowsAtCompileTime)==Dim> TopLeftLhs;
1254 ResultType res(other.rows(),other.cols());
1255 TopLeftLhs(res, 0, 0, Dim, other.cols()).noalias() = T.affine() * other;
1256 res.row(OtherRows-1) = other.row(OtherRows-1);
1262 template<
typename TransformType,
typename MatrixType >
1263 struct transform_right_product_impl< TransformType, MatrixType, 2 >
1266 Dim = TransformType::Dim,
1267 HDim = TransformType::HDim,
1268 OtherRows = MatrixType::RowsAtCompileTime,
1269 OtherCols = MatrixType::ColsAtCompileTime
1272 typedef typename MatrixType::PlainObject ResultType;
1274 static EIGEN_STRONG_INLINE ResultType run(
const TransformType& T,
const MatrixType& other)
1278 typedef Block<ResultType, Dim, OtherCols, true> TopLeftLhs;
1279 ResultType res(Replicate<typename TransformType::ConstTranslationPart, 1, OtherCols>(T.translation(),1,other.cols()));
1280 TopLeftLhs(res, 0, 0, Dim, other.cols()).noalias() += T.linear() * other;
1291 template<
typename Other,
int Mode,
int Options,
int Dim,
int HDim>
1292 struct transform_left_product_impl<Other,Mode,Options,Dim,HDim, HDim,HDim>
1294 typedef Transform<typename Other::Scalar,Dim,Mode,Options> TransformType;
1295 typedef typename TransformType::MatrixType MatrixType;
1296 typedef Transform<typename Other::Scalar,Dim,Projective,Options> ResultType;
1297 static ResultType run(
const Other& other,
const TransformType& tr)
1298 {
return ResultType(other * tr.matrix()); }
1302 template<
typename Other,
int Options,
int Dim,
int HDim>
1303 struct transform_left_product_impl<Other,
AffineCompact,Options,Dim,HDim, HDim,HDim>
1305 typedef Transform<typename Other::Scalar,Dim,AffineCompact,Options> TransformType;
1306 typedef typename TransformType::MatrixType MatrixType;
1307 typedef Transform<typename Other::Scalar,Dim,Projective,Options> ResultType;
1308 static ResultType run(
const Other& other,
const TransformType& tr)
1311 res.matrix().noalias() = other.template block<HDim,Dim>(0,0) * tr.matrix();
1312 res.matrix().col(Dim) += other.col(Dim);
1318 template<
typename Other,
int Mode,
int Options,
int Dim,
int HDim>
1319 struct transform_left_product_impl<Other,Mode,Options,Dim,HDim, Dim,HDim>
1321 typedef Transform<typename Other::Scalar,Dim,Mode,Options> TransformType;
1322 typedef typename TransformType::MatrixType MatrixType;
1323 typedef TransformType ResultType;
1324 static ResultType run(
const Other& other,
const TransformType& tr)
1327 res.affine().noalias() = other * tr.matrix();
1328 res.matrix().row(Dim) = tr.matrix().row(Dim);
1334 template<
typename Other,
int Options,
int Dim,
int HDim>
1335 struct transform_left_product_impl<Other,
AffineCompact,Options,Dim,HDim, Dim,HDim>
1337 typedef Transform<typename Other::Scalar,Dim,AffineCompact,Options> TransformType;
1338 typedef typename TransformType::MatrixType MatrixType;
1339 typedef TransformType ResultType;
1340 static ResultType run(
const Other& other,
const TransformType& tr)
1343 res.matrix().noalias() = other.template block<Dim,Dim>(0,0) * tr.matrix();
1344 res.translation() += other.col(Dim);
1350 template<
typename Other,
int Mode,
int Options,
int Dim,
int HDim>
1351 struct transform_left_product_impl<Other,Mode,Options,Dim,HDim, Dim,Dim>
1353 typedef Transform<typename Other::Scalar,Dim,Mode,Options> TransformType;
1354 typedef typename TransformType::MatrixType MatrixType;
1355 typedef TransformType ResultType;
1356 static ResultType run(
const Other& other,
const TransformType& tr)
1360 res.matrix().row(Dim) = tr.matrix().row(Dim);
1361 res.matrix().template topRows<Dim>().noalias()
1362 = other * tr.matrix().template topRows<Dim>();
1371 template<
typename Scalar,
int Dim,
int LhsMode,
int LhsOptions,
int RhsMode,
int RhsOptions>
1372 struct transform_transform_product_impl<Transform<Scalar,Dim,LhsMode,LhsOptions>,Transform<Scalar,Dim,RhsMode,RhsOptions>,false >
1374 enum { ResultMode = transform_product_result<LhsMode,RhsMode>::Mode };
1375 typedef Transform<Scalar,Dim,LhsMode,LhsOptions> Lhs;
1376 typedef Transform<Scalar,Dim,RhsMode,RhsOptions> Rhs;
1377 typedef Transform<Scalar,Dim,ResultMode,LhsOptions> ResultType;
1378 static ResultType run(
const Lhs& lhs,
const Rhs& rhs)
1381 res.linear() = lhs.linear() * rhs.linear();
1382 res.translation() = lhs.linear() * rhs.translation() + lhs.translation();
1388 template<
typename Scalar,
int Dim,
int LhsMode,
int LhsOptions,
int RhsMode,
int RhsOptions>
1389 struct transform_transform_product_impl<Transform<Scalar,Dim,LhsMode,LhsOptions>,Transform<Scalar,Dim,RhsMode,RhsOptions>,true >
1391 typedef Transform<Scalar,Dim,LhsMode,LhsOptions> Lhs;
1392 typedef Transform<Scalar,Dim,RhsMode,RhsOptions> Rhs;
1393 typedef Transform<Scalar,Dim,Projective> ResultType;
1394 static ResultType run(
const Lhs& lhs,
const Rhs& rhs)
1396 return ResultType( lhs.matrix() * rhs.matrix() );
1400 template<
typename Scalar,
int Dim,
int LhsOptions,
int RhsOptions>
1401 struct transform_transform_product_impl<Transform<Scalar,Dim,
AffineCompact,LhsOptions>,Transform<Scalar,Dim,
Projective,RhsOptions>,true >
1403 typedef Transform<Scalar,Dim,AffineCompact,LhsOptions> Lhs;
1404 typedef Transform<Scalar,Dim,Projective,RhsOptions> Rhs;
1405 typedef Transform<Scalar,Dim,Projective> ResultType;
1406 static ResultType run(
const Lhs& lhs,
const Rhs& rhs)
1409 res.matrix().template topRows<Dim>() = lhs.matrix() * rhs.matrix();
1410 res.matrix().row(Dim) = rhs.matrix().row(Dim);
1415 template<
typename Scalar,
int Dim,
int LhsOptions,
int RhsOptions>
1416 struct transform_transform_product_impl<Transform<Scalar,Dim,
Projective,LhsOptions>,Transform<Scalar,Dim,
AffineCompact,RhsOptions>,true >
1418 typedef Transform<Scalar,Dim,Projective,LhsOptions> Lhs;
1419 typedef Transform<Scalar,Dim,AffineCompact,RhsOptions> Rhs;
1420 typedef Transform<Scalar,Dim,Projective> ResultType;
1421 static ResultType run(
const Lhs& lhs,
const Rhs& rhs)
1423 ResultType res(lhs.matrix().template leftCols<Dim>() * rhs.matrix());
1424 res.matrix().col(Dim) += lhs.matrix().col(Dim);
1433 #endif // EIGEN_TRANSFORM_H