mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-08-11 19:29:02 +08:00
fixed inversion for AffineCompact matrices
This commit is contained in:
parent
56d00779db
commit
c2861dd41a
@ -911,8 +911,11 @@ Transform<Scalar,Dim,Mode>::inverse(TransformTraits hint) const
|
||||
}
|
||||
// translation and remaining parts
|
||||
res.template corner<Dim,1>(TopRight) = - res.template corner<Dim,Dim>(TopLeft) * translation();
|
||||
res.template corner<1,Dim>(BottomLeft).setZero();
|
||||
res.coeffRef(Dim,Dim) = Scalar(1);
|
||||
if (int(Mode)!=AffineCompact)
|
||||
{
|
||||
res.template corner<1,Dim>(BottomLeft).setZero();
|
||||
res.coeffRef(Dim,Dim) = Scalar(1);
|
||||
}
|
||||
return res;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user