* fix in IO.h, a useless copy was made because of assignment from

Derived to MatrixBase.
* the optimization of eval() for Matrix now consists in a partial
  specialization of ei_eval, which returns a reference type for Matrix.
  No overriding of eval() in Matrix anymore. Consequence: careful,
  ei_eval is no longer guaranteed to give a plain matrix type!
  For that, use ei_plain_matrix_type, or the PlainMatrixType typedef.
* so lots of changes to adapt to that everywhere. Hope this doesn't
  break (too much) MSVC compilation.
* add code examples for the new image() stuff.
* lower a bit the precision for floats in the unit tests as
  we were already doing some workarounds in inverse.cpp and we got some
  failed tests.
This commit is contained in:
Benoit Jacob
2008-12-18 20:36:25 +00:00
parent b27a3644a2
commit fabaa6915b
24 changed files with 133 additions and 77 deletions

View File

@@ -548,7 +548,7 @@ inline Transform<Scalar,Dim>& Transform<Scalar,Dim>::operator=(const ScalingType
{
m_matrix.setZero();
linear().diagonal() = s.coeffs();
m_matrix(Dim,Dim) = Scalar(1);
m_matrix.coeffRef(Dim,Dim) = Scalar(1);
return *this;
}
@@ -567,7 +567,7 @@ inline Transform<Scalar,Dim>& Transform<Scalar,Dim>::operator=(const RotationBas
linear() = ei_toRotationMatrix<Scalar,Dim>(r);
translation().setZero();
m_matrix.template block<1,Dim>(Dim,0).setZero();
m_matrix(Dim,Dim) = Scalar(1);
m_matrix.coeffRef(Dim,Dim) = Scalar(1);
return *this;
}
@@ -610,7 +610,7 @@ Transform<Scalar,Dim>::extractRotation(TransformTraits traits) const
LinearMatrixType matQ = qr.matrixQ();
LinearMatrixType matR = qr.matrixR();
for (int i=0 ; i<Dim; ++i)
if (matR(i,i)<0)
if (matR.coeff(i,i)<0)
matQ.col(i) = -matQ.col(i);
return matQ;
}