diff options
author | 2014-07-31 14:54:00 +0200 | |
---|---|---|
committer | 2014-07-31 14:54:00 +0200 | |
commit | 702a3c17db753b4ceaa234eac6591d0d1737015a (patch) | |
tree | 50cc7449f7d4959d40ed7b8f4b08b06ae8bb676c /Eigen/src | |
parent | 5f5a8d97c02deeab6dbf977d40170197c75adc83 (diff) |
Make Transform exposes sizes: Dim+1 x Dim+1 for projective transform, and Dim x Dim+1 for all others
Diffstat (limited to 'Eigen/src')
-rw-r--r-- | Eigen/src/Geometry/Transform.h | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/Eigen/src/Geometry/Transform.h b/Eigen/src/Geometry/Transform.h index 54d05f9cf..a62548f12 100644 --- a/Eigen/src/Geometry/Transform.h +++ b/Eigen/src/Geometry/Transform.h @@ -70,10 +70,11 @@ struct traits<Transform<_Scalar,_Dim,_Mode,_Options> > typedef DenseIndex Index; typedef Dense StorageKind; enum { - RowsAtCompileTime = _Dim, - ColsAtCompileTime = _Dim, - MaxRowsAtCompileTime = _Dim, - MaxColsAtCompileTime = _Dim, + Dim1 = _Dim==Dynamic ? _Dim : _Dim + 1, + RowsAtCompileTime = _Mode==Projective ? Dim1 : _Dim, + ColsAtCompileTime = Dim1, + MaxRowsAtCompileTime = RowsAtCompileTime, + MaxColsAtCompileTime = ColsAtCompileTime, Flags = 0 }; }; @@ -374,7 +375,7 @@ public: #endif #ifdef EIGEN_TEST_EVALUATORS - Index rows() const { return m_matrix.cols(); } + Index rows() const { return Mode==Projective ? m_matrix.cols() : m_matrix.cols()-1; } Index cols() const { return m_matrix.cols(); } #endif |