| 202 | */ |
| 203 | template<typename _Scalar, int _Dim, int _Mode, int _Options> |
| 204 | class Transform |
| 205 | { |
| 206 | public: |
| 207 | EIGEN_MAKE_ALIGNED_OPERATOR_NEW_IF_VECTORIZABLE_FIXED_SIZE(_Scalar,_Dim==Dynamic ? Dynamic : (_Dim+1)*(_Dim+1)) |
| 208 | enum { |
| 209 | Mode = _Mode, |
| 210 | Options = _Options, |
| 211 | Dim = _Dim, ///< space dimension in which the transformation holds |
| 212 | HDim = _Dim+1, ///< size of a respective homogeneous vector |
| 213 | Rows = int(Mode)==(AffineCompact) ? Dim : HDim |
| 214 | }; |
| 215 | /** the scalar type of the coefficients */ |
| 216 | typedef _Scalar Scalar; |
| 217 | typedef Eigen::Index StorageIndex; |
| 218 | typedef Eigen::Index Index; ///< \deprecated since Eigen 3.3 |
| 219 | /** type of the matrix used to represent the transformation */ |
| 220 | typedef typename internal::make_proper_matrix_type<Scalar,Rows,HDim,Options>::type MatrixType; |
| 221 | /** constified MatrixType */ |
| 222 | typedef const MatrixType ConstMatrixType; |
| 223 | /** type of the matrix used to represent the linear part of the transformation */ |
| 224 | typedef Matrix<Scalar,Dim,Dim,Options> LinearMatrixType; |
| 225 | /** type of read/write reference to the linear part of the transformation */ |
| 226 | typedef Block<MatrixType,Dim,Dim,int(Mode)==(AffineCompact) && (int(Options)&RowMajor)==0> LinearPart; |
| 227 | /** type of read reference to the linear part of the transformation */ |
| 228 | typedef const Block<ConstMatrixType,Dim,Dim,int(Mode)==(AffineCompact) && (int(Options)&RowMajor)==0> ConstLinearPart; |
| 229 | /** type of read/write reference to the affine part of the transformation */ |
| 230 | typedef typename internal::conditional<int(Mode)==int(AffineCompact), |
| 231 | MatrixType&, |
| 232 | Block<MatrixType,Dim,HDim> >::type AffinePart; |
| 233 | /** type of read reference to the affine part of the transformation */ |
| 234 | typedef typename internal::conditional<int(Mode)==int(AffineCompact), |
| 235 | const MatrixType&, |
| 236 | const Block<const MatrixType,Dim,HDim> >::type ConstAffinePart; |
| 237 | /** type of a vector */ |
| 238 | typedef Matrix<Scalar,Dim,1> VectorType; |
| 239 | /** type of a read/write reference to the translation part of the rotation */ |
| 240 | typedef Block<MatrixType,Dim,1,!(internal::traits<MatrixType>::Flags & RowMajorBit)> TranslationPart; |
| 241 | /** type of a read reference to the translation part of the rotation */ |
| 242 | typedef const Block<ConstMatrixType,Dim,1,!(internal::traits<MatrixType>::Flags & RowMajorBit)> ConstTranslationPart; |
| 243 | /** corresponding translation type */ |
| 244 | typedef Translation<Scalar,Dim> TranslationType; |
| 245 | |
| 246 | // this intermediate enum is needed to avoid an ICE with gcc 3.4 and 4.0 |
| 247 | enum { TransformTimeDiagonalMode = ((Mode==int(Isometry))?Affine:int(Mode)) }; |
| 248 | /** The return type of the product between a diagonal matrix and a transform */ |
| 249 | typedef Transform<Scalar,Dim,TransformTimeDiagonalMode> TransformTimeDiagonalReturnType; |
| 250 | |
| 251 | protected: |
| 252 | |
| 253 | MatrixType m_matrix; |
| 254 | |
| 255 | public: |
| 256 | |
| 257 | /** Default constructor without initialization of the meaningful coefficients. |
| 258 | * If Mode==Affine or Mode==Isometry, then the last row is set to [0 ... 0 1] */ |
| 259 | EIGEN_DEVICE_FUNC inline Transform() |
| 260 | { |
| 261 | check_template_params(); |
no test coverage detected