mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-09-13 01:43:13 +08:00
Make Transform exposes sizes: Dim+1 x Dim+1 for projective transform, and Dim x Dim+1 for all others
This commit is contained in:
parent
5f5a8d97c0
commit
702a3c17db
@ -70,10 +70,11 @@ struct traits<Transform<_Scalar,_Dim,_Mode,_Options> >
|
|||||||
typedef DenseIndex Index;
|
typedef DenseIndex Index;
|
||||||
typedef Dense StorageKind;
|
typedef Dense StorageKind;
|
||||||
enum {
|
enum {
|
||||||
RowsAtCompileTime = _Dim,
|
Dim1 = _Dim==Dynamic ? _Dim : _Dim + 1,
|
||||||
ColsAtCompileTime = _Dim,
|
RowsAtCompileTime = _Mode==Projective ? Dim1 : _Dim,
|
||||||
MaxRowsAtCompileTime = _Dim,
|
ColsAtCompileTime = Dim1,
|
||||||
MaxColsAtCompileTime = _Dim,
|
MaxRowsAtCompileTime = RowsAtCompileTime,
|
||||||
|
MaxColsAtCompileTime = ColsAtCompileTime,
|
||||||
Flags = 0
|
Flags = 0
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
@ -374,7 +375,7 @@ public:
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef EIGEN_TEST_EVALUATORS
|
#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(); }
|
Index cols() const { return m_matrix.cols(); }
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user