aboutsummaryrefslogtreecommitdiffhomepage
path: root/Eigen/src/Geometry/Homogeneous.h
diff options
context:
space:
mode:
authorGravatar Gael Guennebaud <g.gael@free.fr>2010-06-24 15:13:41 +0200
committerGravatar Gael Guennebaud <g.gael@free.fr>2010-06-24 15:13:41 +0200
commit19f2f53e2c6cac602be479dae84837ab539329ce (patch)
tree3d6a540eabc3a7abc7ff709eec9fe5e8c2a34b85 /Eigen/src/Geometry/Homogeneous.h
parentd44fce501bf299692d578349b92c899c3f0d79cd (diff)
fix compilation when default to row major
Diffstat (limited to 'Eigen/src/Geometry/Homogeneous.h')
-rw-r--r--Eigen/src/Geometry/Homogeneous.h14
1 files changed, 9 insertions, 5 deletions
diff --git a/Eigen/src/Geometry/Homogeneous.h b/Eigen/src/Geometry/Homogeneous.h
index 3077f0921..fc6134fe3 100644
--- a/Eigen/src/Geometry/Homogeneous.h
+++ b/Eigen/src/Geometry/Homogeneous.h
@@ -55,7 +55,10 @@ struct ei_traits<Homogeneous<MatrixType,Direction> >
ColsAtCompileTime = Direction==Horizontal ? ColsPlusOne : MatrixType::ColsAtCompileTime,
MaxRowsAtCompileTime = RowsAtCompileTime,
MaxColsAtCompileTime = ColsAtCompileTime,
- Flags = _MatrixTypeNested::Flags & HereditaryBits,
+ TmpFlags = _MatrixTypeNested::Flags & HereditaryBits,
+ Flags = ColsAtCompileTime==1 ? (TmpFlags & ~RowMajorBit)
+ : RowsAtCompileTime==1 ? (TmpFlags | RowMajorBit)
+ : TmpFlags,
CoeffReadCost = _MatrixTypeNested::CoeffReadCost
};
};
@@ -210,12 +213,13 @@ 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,
+ typedef typename ei_make_proper_matrix_type<
+ typename ei_traits<MatrixType>::Scalar,
Lhs::RowsAtCompileTime,
MatrixType::ColsAtCompileTime,
MatrixType::PlainObject::Options,
Lhs::MaxRowsAtCompileTime,
- MatrixType::MaxColsAtCompileTime> ReturnType;
+ MatrixType::MaxColsAtCompileTime>::type ReturnType;
};
template<typename MatrixType,typename Lhs>
@@ -249,12 +253,12 @@ 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,
+ typedef typename ei_make_proper_matrix_type<typename ei_traits<MatrixType>::Scalar,
MatrixType::RowsAtCompileTime,
Rhs::ColsAtCompileTime,
MatrixType::PlainObject::Options,
MatrixType::MaxRowsAtCompileTime,
- Rhs::MaxColsAtCompileTime> ReturnType;
+ Rhs::MaxColsAtCompileTime>::type ReturnType;
};
template<typename MatrixType,typename Rhs>