mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-07-25 14:24:31 +08:00
optimization: spare the 3x3 matrix product in
fromPositionOrientationScale
This commit is contained in:
parent
6a36b5a6e0
commit
d3529e9c40
@ -388,10 +388,10 @@ Transform<Scalar,Dim>::fromPositionOrientationScale(const MatrixBase<PositionDer
|
||||
const OrientationType& orientation, const MatrixBase<ScaleDerived> &scale)
|
||||
{
|
||||
linear() = ToRotationMatrix<Scalar,Dim,OrientationType>::convert(orientation);
|
||||
for(int i = 0; i < Dim; i++) linear().col(i) *= scale.coeff(i);
|
||||
translation() = position;
|
||||
m_matrix(Dim,Dim) = 1.;
|
||||
m_matrix.template block<1,Dim>(Dim,0).setZero();
|
||||
linear() *= scale.asDiagonal();
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user