Added MatrixBase::Unit*() static function to easily create unit/basis vectors.

Removed EulerAngles, addes typdefs for Quaternion and AngleAxis,
and added automatic conversions from Quaternion/AngleAxis to Matrix3 such that:
 Matrix3f m = AngleAxisf(0.2,Vector3f::UnitX) * AngleAxisf(0.2,Vector3f::UnitY);
just works.
This commit is contained in:
Gael Guennebaud
2008-07-19 13:03:23 +00:00
parent 7245c63067
commit 05ad083467
11 changed files with 154 additions and 67 deletions

View File

@@ -89,14 +89,6 @@ struct ToRotationMatrix<Scalar, 3, AngleAxis<OtherScalarType> >
{ return aa.toRotationMatrix(); }
};
// euler angles to rotation matrix
template<typename Scalar, typename OtherScalarType>
struct ToRotationMatrix<Scalar, 3, EulerAngles<OtherScalarType> >
{
inline static Matrix<Scalar,3,3> convert(const EulerAngles<OtherScalarType>& ea)
{ return ea.toRotationMatrix(); }
};
// matrix xpr to matrix xpr
template<typename Scalar, int Dim, typename OtherDerived>
struct ToRotationMatrix<Scalar, Dim, MatrixBase<OtherDerived> >