the big Array/Cwise rework as discussed on the mailing list. The new API

can be seen in Eigen/src/Core/Cwise.h.
This commit is contained in:
Benoit Jacob
2008-07-08 00:49:10 +00:00
parent c910c517b3
commit f5791eeb70
26 changed files with 465 additions and 389 deletions

View File

@@ -139,7 +139,7 @@ AngleAxis<Scalar>::toRotationMatrix(void) const
res.coeffRef(1,2) = tmp - sin_axis.x();
res.coeffRef(2,1) = tmp + sin_axis.x();
res.diagonal() = Vector3::constant(c) + cos1_axis.cwiseProduct(m_axis);
res.diagonal() = (cos1_axis.cwise() * m_axis).cwise() + c;
return res;
}

View File

@@ -212,8 +212,8 @@ inline Quaternion<Scalar>& Quaternion<Scalar>::operator=(EulerAnglesType ea)
{
ea.coeffs() *= 0.5;
Vector3 cosines = ea.coeffs().cwiseCos();
Vector3 sines = ea.coeffs().cwiseSin();
Vector3 cosines = ea.coeffs().cwise().cos();
Vector3 sines = ea.coeffs().cwise().sin();
Scalar cYcZ = cosines.y() * cosines.z();
Scalar sYsZ = sines.y() * sines.z();