diff options
Diffstat (limited to 'Eigen')
-rw-r--r-- | Eigen/src/Geometry/Homogeneous.h | 16 | ||||
-rw-r--r-- | Eigen/src/Geometry/RotationBase.h | 7 | ||||
-rw-r--r-- | Eigen/src/Geometry/Transform.h | 10 | ||||
-rw-r--r-- | Eigen/src/Geometry/Translation.h | 6 |
4 files changed, 20 insertions, 19 deletions
diff --git a/Eigen/src/Geometry/Homogeneous.h b/Eigen/src/Geometry/Homogeneous.h index 5f4cddcea..0b154f47b 100644 --- a/Eigen/src/Geometry/Homogeneous.h +++ b/Eigen/src/Geometry/Homogeneous.h @@ -75,13 +75,13 @@ template<typename MatrixType,int _Direction> 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<typename MatrixType,int _Direction> class Homogeneous inline const ei_homogeneous_right_product_impl<Homogeneous,Rhs> operator* (const MatrixBase<Rhs>& rhs) const { - ei_assert(Direction==Horizontal); + ei_assert(int(Direction)==Horizontal); return ei_homogeneous_right_product_impl<Homogeneous,Rhs>(m_matrix,rhs.derived()); } @@ -98,7 +98,7 @@ template<typename MatrixType,int _Direction> class Homogeneous inline const ei_homogeneous_left_product_impl<Homogeneous,Lhs> operator* (const MatrixBase<Lhs>& lhs, const Homogeneous& rhs) { - ei_assert(Direction==Vertical); + ei_assert(int(Direction)==Vertical); return ei_homogeneous_left_product_impl<Homogeneous,Lhs>(lhs.derived(),rhs.m_matrix); } @@ -107,7 +107,7 @@ template<typename MatrixType,int _Direction> class Homogeneous typename Transform<Scalar,Dim,Mode>::AffinePartNested> operator* (const Transform<Scalar,Dim,Mode>& tr, const Homogeneous& rhs) { - ei_assert(Direction==Vertical); + ei_assert(int(Direction)==Vertical); return ei_homogeneous_left_product_impl<Homogeneous,typename Transform<Scalar,Dim,Mode>::AffinePartNested > (tr.affine(),rhs.m_matrix); } @@ -117,7 +117,7 @@ template<typename MatrixType,int _Direction> class Homogeneous typename Transform<Scalar,Dim,Projective>::MatrixType> operator* (const Transform<Scalar,Dim,Projective>& tr, const Homogeneous& rhs) { - ei_assert(Direction==Vertical); + ei_assert(int(Direction)==Vertical); return ei_homogeneous_left_product_impl<Homogeneous,typename Transform<Scalar,Dim,Projective>::MatrixType> (tr.matrix(),rhs.m_matrix); } diff --git a/Eigen/src/Geometry/RotationBase.h b/Eigen/src/Geometry/RotationBase.h index b129b706b..baffd8e24 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<typename OtherDerived> inline typename ei_rotation_base_generic_product_selector<Derived,OtherDerived,OtherDerived::IsVectorAtCompileTime>::ReturnType - operator*(const MatrixBase<OtherDerived>& e) const + operator*(const AnyMatrixBase<OtherDerived>& e) const { return ei_rotation_base_generic_product_selector<Derived,OtherDerived>::run(derived(), e.derived()); } /** \returns the concatenation of a linear transformation \a l with the rotation \a r */ template<typename OtherDerived> friend - inline RotationMatrixType operator*(const MultiplierBase<OtherDerived>& l, const Derived& r) + inline RotationMatrixType operator*(const AnyMatrixBase<OtherDerived>& 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 b1f3de301..da3187e3c 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<typename OtherDerived> inline const typename ei_transform_right_product_impl<OtherDerived,Mode,_Dim,_Dim+1>::ResultType - operator * (const MultiplierBase<OtherDerived> &other) const + operator * (const AnyMatrixBase<OtherDerived> &other) const { return ei_transform_right_product_impl<OtherDerived,Mode,Dim,HDim>::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<typename OtherDerived> friend inline const typename ei_transform_left_product_impl<OtherDerived,Mode,_Dim,_Dim+1>::ResultType - operator * (const MultiplierBase<OtherDerived> &a, const Transform &b) + operator * (const AnyMatrixBase<OtherDerived> &a, const Transform &b) { return ei_transform_left_product_impl<OtherDerived,Mode,Dim,HDim>::run(a.derived(),b); } template<typename OtherDerived> - inline Transform& operator*=(const MultiplierBase<OtherDerived>& other) { return *this = *this * other; } + inline Transform& operator*=(const AnyMatrixBase<OtherDerived>& 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<Other, AffineCompact,Dim,HDim, HDim,HD }; /********************************************************* -*** Specializations of operator* with a MultiplierBase *** +*** Specializations of operator* with a AnyMatrixBase *** *********************************************************/ // ei_general_product_return_type is a generalization of ProductReturnType, for all types (including e.g. DiagonalBase...), @@ -989,7 +989,7 @@ template<typename Lhs, typename D2> struct ei_general_product_return_type<Lhs, M { typedef D2 Type; }; template<typename D1, typename Rhs> struct ei_general_product_return_type<MatrixBase<D1>, 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 a90e1b2f2..1fff03810 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<typename OtherDerived> - inline AffineTransformType operator* (const MultiplierBase<OtherDerived>& linear) const; + inline AffineTransformType operator* (const AnyMatrixBase<OtherDerived>& linear) const; /** Concatenates a translation and a rotation */ template<typename Derived> @@ -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<typename OtherDerived> friend - inline AffineTransformType operator*(const MultiplierBase<OtherDerived>& linear, const Translation& t) + inline AffineTransformType operator*(const AnyMatrixBase<OtherDerived>& linear, const Translation& t) { AffineTransformType res; res.matrix().setZero(); @@ -182,7 +182,7 @@ Translation<Scalar,Dim>::operator* (const UniformScaling<Scalar>& other) const template<typename Scalar, int Dim> template<typename OtherDerived> inline typename Translation<Scalar,Dim>::AffineTransformType -Translation<Scalar,Dim>::operator* (const MultiplierBase<OtherDerived>& linear) const +Translation<Scalar,Dim>::operator* (const AnyMatrixBase<OtherDerived>& linear) const { AffineTransformType res; res.matrix().setZero(); |