diff options
author | Hauke Heibel <hauke.heibel@gmail.com> | 2009-08-06 12:25:18 +0200 |
---|---|---|
committer | Hauke Heibel <hauke.heibel@gmail.com> | 2009-08-06 12:25:18 +0200 |
commit | c2861dd41a1b0f86757af98011d20e156b05979b (patch) | |
tree | 64290e9bb237622c67c59b1a87c2eea3298853a3 | |
parent | 56d00779db6975fea0821a71abf6323f98a1f4c0 (diff) |
fixed inversion for AffineCompact matrices
-rw-r--r-- | Eigen/src/Geometry/Transform.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/Eigen/src/Geometry/Transform.h b/Eigen/src/Geometry/Transform.h index 842a6bb4e..2762ea2b5 100644 --- a/Eigen/src/Geometry/Transform.h +++ b/Eigen/src/Geometry/Transform.h @@ -911,8 +911,11 @@ Transform<Scalar,Dim,Mode>::inverse(TransformTraits hint) const } // translation and remaining parts res.template corner<Dim,1>(TopRight) = - res.template corner<Dim,Dim>(TopLeft) * translation(); - res.template corner<1,Dim>(BottomLeft).setZero(); - res.coeffRef(Dim,Dim) = Scalar(1); + if (int(Mode)!=AffineCompact) + { + res.template corner<1,Dim>(BottomLeft).setZero(); + res.coeffRef(Dim,Dim) = Scalar(1); + } return res; } } |