mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-08-12 11:49: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
|
// translation and remaining parts
|
||||||
res.template corner<Dim,1>(TopRight) = - res.template corner<Dim,Dim>(TopLeft) * translation();
|
res.template corner<Dim,1>(TopRight) = - res.template corner<Dim,Dim>(TopLeft) * translation();
|
||||||
res.template corner<1,Dim>(BottomLeft).setZero();
|
if (int(Mode)!=AffineCompact)
|
||||||
res.coeffRef(Dim,Dim) = Scalar(1);
|
{
|
||||||
|
res.template corner<1,Dim>(BottomLeft).setZero();
|
||||||
|
res.coeffRef(Dim,Dim) = Scalar(1);
|
||||||
|
}
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user