mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-01-30 17:40:05 +08:00
fix compilation of transform * scaling
This commit is contained in:
parent
3e99356b59
commit
3f24dbf6f5
@ -46,6 +46,7 @@ class DiagonalBase : public EigenBase<Derived>
|
||||
};
|
||||
|
||||
typedef Matrix<Scalar, RowsAtCompileTime, ColsAtCompileTime, 0, MaxRowsAtCompileTime, MaxColsAtCompileTime> DenseMatrixType;
|
||||
typedef DiagonalMatrix<Scalar,DiagonalVectorType::SizeAtCompileTime,DiagonalVectorType::MaxSizeAtCompileTime> PlainObject;
|
||||
|
||||
inline const Derived& derived() const { return *static_cast<const Derived*>(this); }
|
||||
inline Derived& derived() { return *static_cast<Derived*>(this); }
|
||||
|
@ -380,10 +380,11 @@ public:
|
||||
* product results in a Transform of the same type (mode) as the lhs only if the lhs
|
||||
* mode is no isometry. In that case, the returned transform is an affinity.
|
||||
*/
|
||||
friend inline const Transform<Scalar,Dim,((Mode==(int)Isometry)?Affine:(int)Mode)>
|
||||
operator * (const Transform &a, const DiagonalMatrix<Scalar,Dim> &b)
|
||||
template<typename DiagonalDerived>
|
||||
inline const Transform<Scalar,Dim,((Mode==(int)Isometry)?Affine:(int)Mode)>
|
||||
operator * (const DiagonalBase<DiagonalDerived> &b) const
|
||||
{
|
||||
Transform<Scalar,Dim,((Mode==(int)Isometry)?Affine:(int)Mode)> res(a);
|
||||
Transform<Scalar,Dim,((Mode==(int)Isometry)?Affine:(int)Mode)> res(*this);
|
||||
res.linear() *= b;
|
||||
return res;
|
||||
}
|
||||
@ -394,8 +395,9 @@ public:
|
||||
* product results in a Transform of the same type (mode) as the lhs only if the lhs
|
||||
* mode is no isometry. In that case, the returned transform is an affinity.
|
||||
*/
|
||||
template<typename DiagonalDerived>
|
||||
friend inline const Transform<Scalar,Dim,((Mode==(int)Isometry)?Affine:(int)Mode)>
|
||||
operator * (const DiagonalMatrix<Scalar,Dim> &a, const Transform &b)
|
||||
operator * (const DiagonalBase<DiagonalDerived> &a, const Transform &b)
|
||||
{
|
||||
Transform<Scalar,Dim,((Mode==(int)Isometry)?Affine:(int)Mode)> res;
|
||||
res.linear().noalias() = a*b.linear();
|
||||
|
Loading…
Reference in New Issue
Block a user