From 6b89ee0095b9012302d0871d2300e60422a62316 Mon Sep 17 00:00:00 2001 From: Hauke Heibel Date: Thu, 29 Jul 2010 15:54:32 +0200 Subject: Transform is now per default Projective. Improved invert() in the Transform class. RotationBase offers matrix() to be conform with Transform's naming scheme. Added Translation::translation() to be conform with Transform's naming scheme. --- Eigen/src/Geometry/RotationBase.h | 5 +++++ Eigen/src/Geometry/Transform.h | 5 ----- Eigen/src/Geometry/Translation.h | 3 +++ 3 files changed, 8 insertions(+), 5 deletions(-) (limited to 'Eigen/src/Geometry') diff --git a/Eigen/src/Geometry/RotationBase.h b/Eigen/src/Geometry/RotationBase.h index 5b6d10649..4f0eeca20 100644 --- a/Eigen/src/Geometry/RotationBase.h +++ b/Eigen/src/Geometry/RotationBase.h @@ -55,6 +55,11 @@ class RotationBase /** \returns an equivalent rotation matrix */ inline RotationMatrixType toRotationMatrix() const { return derived().toRotationMatrix(); } + /** \returns an equivalent rotation matrix + * This function is added to be conform with the Transform class' naming scheme. + */ + inline RotationMatrixType matrix() const { return derived().toRotationMatrix(); } + /** \returns the inverse rotation */ inline Derived inverse() const { return derived().inverse(); } diff --git a/Eigen/src/Geometry/Transform.h b/Eigen/src/Geometry/Transform.h index 70d172c10..68fda1323 100644 --- a/Eigen/src/Geometry/Transform.h +++ b/Eigen/src/Geometry/Transform.h @@ -954,11 +954,6 @@ Transform::inverse(TransformTraits hint) const // translation and remaining parts res.matrix().template topRightCorner() = - res.matrix().template topLeftCorner() * translation(); - if(int(Mode)!=int(AffineCompact)) - { - res.matrix().template block<1,Dim>(Dim,0).setZero(); - res.matrix().coeffRef(Dim,Dim) = 1; - } } return res; } diff --git a/Eigen/src/Geometry/Translation.h b/Eigen/src/Geometry/Translation.h index 8b8c9c25c..06db9956e 100644 --- a/Eigen/src/Geometry/Translation.h +++ b/Eigen/src/Geometry/Translation.h @@ -98,6 +98,9 @@ public: const VectorType& vector() const { return m_coeffs; } VectorType& vector() { return m_coeffs; } + const VectorType& translation() const { return m_coeffs; } + VectorType& translation() { return m_coeffs; } + /** Concatenates two translation */ inline Translation operator* (const Translation& other) const { return Translation(m_coeffs + other.m_coeffs); } -- cgit v1.2.3