aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--Eigen/src/Core/MatrixBase.h3
-rw-r--r--Eigen/src/Geometry/Scaling.h18
2 files changed, 11 insertions, 10 deletions
diff --git a/Eigen/src/Core/MatrixBase.h b/Eigen/src/Core/MatrixBase.h
index 70d8b9ded..71eba430b 100644
--- a/Eigen/src/Core/MatrixBase.h
+++ b/Eigen/src/Core/MatrixBase.h
@@ -359,7 +359,7 @@ template<typename Derived> class MatrixBase
const Eigen::Transpose<Derived> transpose() const;
void transposeInPlace();
const AdjointReturnType adjoint() const;
-
+
Eigen::Reverse<Derived, BothDirections> reverse();
const Eigen::Reverse<Derived, BothDirections> reverse() const;
void reverseInPlace();
@@ -617,6 +617,7 @@ template<typename Derived> class MatrixBase
PlainMatrixType cross(const MatrixBase<OtherDerived>& other) const;
PlainMatrixType unitOrthogonal(void) const;
Matrix<Scalar,3,1> eulerAngles(int a0, int a1, int a2) const;
+ const ScalarMultipleReturnType operator*(const UniformScaling<Scalar>& s) const;
/////////// Sparse module ///////////
diff --git a/Eigen/src/Geometry/Scaling.h b/Eigen/src/Geometry/Scaling.h
index 22e356964..89fe3d6d5 100644
--- a/Eigen/src/Geometry/Scaling.h
+++ b/Eigen/src/Geometry/Scaling.h
@@ -60,8 +60,8 @@ public:
/** Constructs and initialize a uniform scaling transformation */
explicit inline UniformScaling(const Scalar& s) : m_factor(s) {}
- const Scalar& factor() const { return m_factor; }
- Scalar& factor() { return m_factor; }
+ inline const Scalar& factor() const { return m_factor; }
+ inline Scalar& factor() { return m_factor; }
/** Concatenates two uniform scaling */
inline UniformScaling operator* (const UniformScaling& other) const
@@ -81,13 +81,6 @@ public:
inline typename ei_eval<Derived>::type operator* (const MatrixBase<Derived>& other) const
{ return other * m_factor; }
- /** Concatenates a linear transformation matrix and a uniform scaling */
- // TODO returns an expression
- template<typename Derived>
- friend inline typename ei_eval<Derived>::type
- operator* (const MatrixBase<Derived>& other, const UniformScaling& s)
- { return other * s.factor(); }
-
template<typename Derived,int Dim>
inline Matrix<Scalar,Dim,Dim> operator*(const RotationBase<Derived,Dim>& r) const
{ return r.toRotationMatrix() * m_factor; }
@@ -119,6 +112,13 @@ public:
};
+/** Concatenates a linear transformation matrix and a uniform scaling */
+// NOTE this operator is defiend in MatrixBase and not as a friend function
+// of UniformScaling to fix an internal crash of Intel's ICC
+template<typename Derived> const typename MatrixBase<Derived>::ScalarMultipleReturnType
+MatrixBase<Derived>::operator*(const UniformScaling<Scalar>& s) const
+{ return derived() * s.factor(); }
+
/** Constructs a uniform scaling from scale factor \a s */
static inline UniformScaling<float> Scaling(float s) { return UniformScaling<float>(s); }
/** Constructs a uniform scaling from scale factor \a s */