diff --git a/Eigen/src/Geometry/Homogeneous.h b/Eigen/src/Geometry/Homogeneous.h index 5f4cddcea6..0b154f47b3 100644 --- a/Eigen/src/Geometry/Homogeneous.h +++ b/Eigen/src/Geometry/Homogeneous.h @@ -75,13 +75,13 @@ template class Homogeneous : m_matrix(matrix) {} - inline int rows() const { return m_matrix.rows() + (Direction==Vertical ? 1 : 0); } - inline int cols() const { return m_matrix.cols() + (Direction==Horizontal ? 1 : 0); } + inline int rows() const { return m_matrix.rows() + (int(Direction)==Vertical ? 1 : 0); } + inline int cols() const { return m_matrix.cols() + (int(Direction)==Horizontal ? 1 : 0); } inline Scalar coeff(int row, int col) const { - if( (Direction==Vertical && row==m_matrix.rows()) - || (Direction==Horizontal && col==m_matrix.cols())) + if( (int(Direction)==Vertical && row==m_matrix.rows()) + || (int(Direction)==Horizontal && col==m_matrix.cols())) return 1; return m_matrix.coeff(row, col); } @@ -90,7 +90,7 @@ template class Homogeneous inline const ei_homogeneous_right_product_impl operator* (const MatrixBase& rhs) const { - ei_assert(Direction==Horizontal); + ei_assert(int(Direction)==Horizontal); return ei_homogeneous_right_product_impl(m_matrix,rhs.derived()); } @@ -98,7 +98,7 @@ template class Homogeneous inline const ei_homogeneous_left_product_impl operator* (const MatrixBase& lhs, const Homogeneous& rhs) { - ei_assert(Direction==Vertical); + ei_assert(int(Direction)==Vertical); return ei_homogeneous_left_product_impl(lhs.derived(),rhs.m_matrix); } @@ -107,7 +107,7 @@ template class Homogeneous typename Transform::AffinePartNested> operator* (const Transform& tr, const Homogeneous& rhs) { - ei_assert(Direction==Vertical); + ei_assert(int(Direction)==Vertical); return ei_homogeneous_left_product_impl::AffinePartNested > (tr.affine(),rhs.m_matrix); } @@ -117,7 +117,7 @@ template class Homogeneous typename Transform::MatrixType> operator* (const Transform& tr, const Homogeneous& rhs) { - ei_assert(Direction==Vertical); + ei_assert(int(Direction)==Vertical); return ei_homogeneous_left_product_impl::MatrixType> (tr.matrix(),rhs.m_matrix); } diff --git a/Eigen/src/Geometry/RotationBase.h b/Eigen/src/Geometry/RotationBase.h index b129b706bb..baffd8e245 100644 --- a/Eigen/src/Geometry/RotationBase.h +++ b/Eigen/src/Geometry/RotationBase.h @@ -68,17 +68,18 @@ class RotationBase /** \returns the concatenation of the rotation \c *this with a generic expression \a e * \a e can be: - * - a DimxDim linear transformation matrix (including an axis aligned scaling) + * - a DimxDim linear transformation matrix + * - a DimxDim diagonal matrix (axis aligned scaling) * - a vector of size Dim */ template inline typename ei_rotation_base_generic_product_selector::ReturnType - operator*(const MatrixBase& e) const + operator*(const AnyMatrixBase& e) const { return ei_rotation_base_generic_product_selector::run(derived(), e.derived()); } /** \returns the concatenation of a linear transformation \a l with the rotation \a r */ template friend - inline RotationMatrixType operator*(const MultiplierBase& l, const Derived& r) + inline RotationMatrixType operator*(const AnyMatrixBase& l, const Derived& r) { return l.derived() * r.toRotationMatrix(); } /** \returns the concatenation of the rotation \c *this with a transformation \a t */ diff --git a/Eigen/src/Geometry/Transform.h b/Eigen/src/Geometry/Transform.h index b1f3de3011..da3187e3ca 100644 --- a/Eigen/src/Geometry/Transform.h +++ b/Eigen/src/Geometry/Transform.h @@ -310,7 +310,7 @@ public: // note: this function is defined here because some compilers cannot find the respective declaration template inline const typename ei_transform_right_product_impl::ResultType - operator * (const MultiplierBase &other) const + operator * (const AnyMatrixBase &other) const { return ei_transform_right_product_impl::run(*this,other.derived()); } /** \returns the product expression of a transformation matrix \a a times a transform \a b @@ -322,11 +322,11 @@ public: */ template friend inline const typename ei_transform_left_product_impl::ResultType - operator * (const MultiplierBase &a, const Transform &b) + operator * (const AnyMatrixBase &a, const Transform &b) { return ei_transform_left_product_impl::run(a.derived(),b); } template - inline Transform& operator*=(const MultiplierBase& other) { return *this = *this * other; } + inline Transform& operator*=(const AnyMatrixBase& other) { return *this = *this * other; } /** Contatenates two transformations */ inline const Transform operator * (const Transform& other) const @@ -977,7 +977,7 @@ struct ei_transform_construct_from_matrix struct ei_general_product_return_type struct ei_general_product_return_type, Rhs > { typedef D1 Type; }; - + // Projective * set of homogeneous column vectors diff --git a/Eigen/src/Geometry/Translation.h b/Eigen/src/Geometry/Translation.h index a90e1b2f2a..1fff038106 100644 --- a/Eigen/src/Geometry/Translation.h +++ b/Eigen/src/Geometry/Translation.h @@ -93,7 +93,7 @@ public: /** Concatenates a translation and a linear transformation */ template - inline AffineTransformType operator* (const MultiplierBase& linear) const; + inline AffineTransformType operator* (const AnyMatrixBase& linear) const; /** Concatenates a translation and a rotation */ template @@ -103,7 +103,7 @@ public: /** \returns the concatenation of a linear transformation \a l with the translation \a t */ // its a nightmare to define a templated friend function outside its declaration template friend - inline AffineTransformType operator*(const MultiplierBase& linear, const Translation& t) + inline AffineTransformType operator*(const AnyMatrixBase& linear, const Translation& t) { AffineTransformType res; res.matrix().setZero(); @@ -182,7 +182,7 @@ Translation::operator* (const UniformScaling& other) const template template inline typename Translation::AffineTransformType -Translation::operator* (const MultiplierBase& linear) const +Translation::operator* (const AnyMatrixBase& linear) const { AffineTransformType res; res.matrix().setZero();