Translation * RotationBase now returns an isometric transformation.

This commit is contained in:
Hauke Heibel 2011-07-19 11:13:40 +02:00
parent 3fb65734ab
commit 705023fd85

View File

@ -54,6 +54,8 @@ public:
typedef Matrix<Scalar,Dim,Dim> LinearMatrixType; typedef Matrix<Scalar,Dim,Dim> LinearMatrixType;
/** corresponding affine transformation type */ /** corresponding affine transformation type */
typedef Transform<Scalar,Dim,Affine> AffineTransformType; typedef Transform<Scalar,Dim,Affine> AffineTransformType;
/** corresponding isometric transformation type */
typedef Transform<Scalar,Dim,Isometry> IsometryTransformType;
protected: protected:
@ -114,8 +116,8 @@ public:
/** Concatenates a translation and a rotation */ /** Concatenates a translation and a rotation */
template<typename Derived> template<typename Derived>
inline AffineTransformType operator*(const RotationBase<Derived,Dim>& r) const inline IsometryTransformType operator*(const RotationBase<Derived,Dim>& r) const
{ return *this * r.toRotationMatrix(); } { return *this * IsometryTransformType(r); }
/** \returns the concatenation of a linear transformation \a l with the translation \a t */ /** \returns the concatenation of a linear transformation \a l with the translation \a t */
// its a nightmare to define a templated friend function outside its declaration // its a nightmare to define a templated friend function outside its declaration