aboutsummaryrefslogtreecommitdiffhomepage
path: root/Eigen/src/Geometry
diff options
context:
space:
mode:
authorGravatar Benoit Jacob <jacob.benoit.1@gmail.com>2009-09-22 12:20:45 -0400
committerGravatar Benoit Jacob <jacob.benoit.1@gmail.com>2009-09-22 12:20:45 -0400
commitc1c780a94f148c618a74cfcccf40037442ae2d7c (patch)
treee12cabb53fef344865631c7c9360d995000ea463 /Eigen/src/Geometry
parent1df54e3ac23780cd67c91c50f27052199902f81f (diff)
* ReturnByValue:
-- simpplify by removing the 2nd template parameter -- rename Functor to Derived, as now it's a usual CRTP * Homogeneous: -- in products, honor the Max sizes etc.
Diffstat (limited to 'Eigen/src/Geometry')
-rw-r--r--Eigen/src/Geometry/Homogeneous.h30
-rw-r--r--Eigen/src/Geometry/Transform.h8
2 files changed, 28 insertions, 10 deletions
diff --git a/Eigen/src/Geometry/Homogeneous.h b/Eigen/src/Geometry/Homogeneous.h
index 2de99b5de..035d213b7 100644
--- a/Eigen/src/Geometry/Homogeneous.h
+++ b/Eigen/src/Geometry/Homogeneous.h
@@ -207,10 +207,19 @@ VectorwiseOp<ExpressionType,Direction>::hnormalized() const
}
template<typename MatrixType,typename Lhs>
+struct ei_traits<ei_homogeneous_left_product_impl<Homogeneous<MatrixType,Vertical>,Lhs> >
+{
+ typedef Matrix<typename ei_traits<MatrixType>::Scalar,
+ Lhs::RowsAtCompileTime,
+ MatrixType::ColsAtCompileTime,
+ MatrixType::PlainMatrixType::Options,
+ Lhs::MaxRowsAtCompileTime,
+ MatrixType::MaxColsAtCompileTime> ReturnMatrixType;
+};
+
+template<typename MatrixType,typename Lhs>
struct ei_homogeneous_left_product_impl<Homogeneous<MatrixType,Vertical>,Lhs>
- : public ReturnByValue<ei_homogeneous_left_product_impl<Homogeneous<MatrixType,Vertical>,Lhs>,
- Matrix<typename ei_traits<MatrixType>::Scalar,
- Lhs::RowsAtCompileTime,MatrixType::ColsAtCompileTime> >
+ : public ReturnByValue<ei_homogeneous_left_product_impl<Homogeneous<MatrixType,Vertical>,Lhs> >
{
typedef typename ei_cleantype<typename Lhs::Nested>::type LhsNested;
ei_homogeneous_left_product_impl(const Lhs& lhs, const MatrixType& rhs)
@@ -236,10 +245,19 @@ struct ei_homogeneous_left_product_impl<Homogeneous<MatrixType,Vertical>,Lhs>
};
template<typename MatrixType,typename Rhs>
+struct ei_traits<ei_homogeneous_right_product_impl<Homogeneous<MatrixType,Horizontal>,Rhs> >
+{
+ typedef Matrix<typename ei_traits<MatrixType>::Scalar,
+ MatrixType::RowsAtCompileTime,
+ Rhs::ColsAtCompileTime,
+ MatrixType::PlainMatrixType::Options,
+ MatrixType::MaxRowsAtCompileTime,
+ Rhs::MaxColsAtCompileTime> ReturnMatrixType;
+};
+
+template<typename MatrixType,typename Rhs>
struct ei_homogeneous_right_product_impl<Homogeneous<MatrixType,Horizontal>,Rhs>
- : public ReturnByValue<ei_homogeneous_right_product_impl<Homogeneous<MatrixType,Horizontal>,Rhs>,
- Matrix<typename ei_traits<MatrixType>::Scalar,
- MatrixType::RowsAtCompileTime, Rhs::ColsAtCompileTime> >
+ : public ReturnByValue<ei_homogeneous_right_product_impl<Homogeneous<MatrixType,Horizontal>,Rhs> >
{
typedef typename ei_cleantype<typename Rhs::Nested>::type RhsNested;
ei_homogeneous_right_product_impl(const MatrixType& lhs, const Rhs& rhs)
diff --git a/Eigen/src/Geometry/Transform.h b/Eigen/src/Geometry/Transform.h
index e89581e21..d03fd52fd 100644
--- a/Eigen/src/Geometry/Transform.h
+++ b/Eigen/src/Geometry/Transform.h
@@ -247,14 +247,14 @@ public:
ei_transform_construct_from_matrix<OtherMatrixType,Mode,Dim,HDim>::run(this, other.matrix());
}
- template<typename OtherDerived,typename OtherEvalType>
- Transform(const ReturnByValue<OtherDerived,OtherEvalType>& other)
+ template<typename OtherDerived>
+ Transform(const ReturnByValue<OtherDerived>& other)
{
other.evalTo(*this);
}
- template<typename OtherDerived,typename OtherEvalType>
- Transform& operator=(const ReturnByValue<OtherDerived,OtherEvalType>& other)
+ template<typename OtherDerived>
+ Transform& operator=(const ReturnByValue<OtherDerived>& other)
{
other.evalTo(*this);
return *this;