mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-08-12 03:39:01 +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 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 const Derived& derived() const { return *static_cast<const Derived*>(this); }
|
||||||
inline Derived& derived() { return *static_cast<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
|
* 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.
|
* 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)>
|
template<typename DiagonalDerived>
|
||||||
operator * (const Transform &a, const DiagonalMatrix<Scalar,Dim> &b)
|
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;
|
res.linear() *= b;
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
@ -394,8 +395,9 @@ public:
|
|||||||
* product results in a Transform of the same type (mode) as the lhs only if the lhs
|
* 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.
|
* 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)>
|
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;
|
Transform<Scalar,Dim,((Mode==(int)Isometry)?Affine:(int)Mode)> res;
|
||||||
res.linear().noalias() = a*b.linear();
|
res.linear().noalias() = a*b.linear();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user