aboutsummaryrefslogtreecommitdiffhomepage
path: root/Eigen/src/Geometry
diff options
context:
space:
mode:
authorGravatar Hauke Heibel <hauke.heibel@gmail.com>2010-07-29 15:54:32 +0200
committerGravatar Hauke Heibel <hauke.heibel@gmail.com>2010-07-29 15:54:32 +0200
commit6b89ee0095b9012302d0871d2300e60422a62316 (patch)
tree87b81aa478951f2fb26b2237b1485cfcd7065a89 /Eigen/src/Geometry
parent2f0e8904f1c2450ee013f671260c833c7e99a9f8 (diff)
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.
Diffstat (limited to 'Eigen/src/Geometry')
-rw-r--r--Eigen/src/Geometry/RotationBase.h5
-rw-r--r--Eigen/src/Geometry/Transform.h5
-rw-r--r--Eigen/src/Geometry/Translation.h3
3 files changed, 8 insertions, 5 deletions
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<Scalar,Dim,Mode>::inverse(TransformTraits hint) const
// translation and remaining parts
res.matrix().template topRightCorner<Dim,1>()
= - res.matrix().template topLeftCorner<Dim,Dim>() * 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); }