Added more common typedefs.

This commit is contained in:
Hauke Heibel 2009-10-27 15:57:21 +01:00
parent 7cc9fb5d0a
commit dbaba9019b
2 changed files with 24 additions and 6 deletions

View File

@ -794,11 +794,20 @@ typedef Matrix<Type, Size, 1> Vector##SizeSuffix##TypeSuffix; \
/** \ingroup matrixtypedefs */ \ /** \ingroup matrixtypedefs */ \
typedef Matrix<Type, 1, Size> RowVector##SizeSuffix##TypeSuffix; typedef Matrix<Type, 1, Size> RowVector##SizeSuffix##TypeSuffix;
#define EIGEN_MAKE_FIXED_TYPEDEFS(Type, TypeSuffix, Size) \
/** \ingroup matrixtypedefs */ \
typedef Matrix<Type, Size, Dynamic> Matrix##Size##X##TypeSuffix; \
/** \ingroup matrixtypedefs */ \
typedef Matrix<Type, Dynamic, Size> Matrix##X##Size##TypeSuffix;
#define EIGEN_MAKE_TYPEDEFS_ALL_SIZES(Type, TypeSuffix) \ #define EIGEN_MAKE_TYPEDEFS_ALL_SIZES(Type, TypeSuffix) \
EIGEN_MAKE_TYPEDEFS(Type, TypeSuffix, 2, 2) \ EIGEN_MAKE_TYPEDEFS(Type, TypeSuffix, 2, 2) \
EIGEN_MAKE_TYPEDEFS(Type, TypeSuffix, 3, 3) \ EIGEN_MAKE_TYPEDEFS(Type, TypeSuffix, 3, 3) \
EIGEN_MAKE_TYPEDEFS(Type, TypeSuffix, 4, 4) \ EIGEN_MAKE_TYPEDEFS(Type, TypeSuffix, 4, 4) \
EIGEN_MAKE_TYPEDEFS(Type, TypeSuffix, Dynamic, X) EIGEN_MAKE_TYPEDEFS(Type, TypeSuffix, Dynamic, X) \
EIGEN_MAKE_FIXED_TYPEDEFS(Type, TypeSuffix, 2) \
EIGEN_MAKE_FIXED_TYPEDEFS(Type, TypeSuffix, 3) \
EIGEN_MAKE_FIXED_TYPEDEFS(Type, TypeSuffix, 4)
EIGEN_MAKE_TYPEDEFS_ALL_SIZES(int, i) EIGEN_MAKE_TYPEDEFS_ALL_SIZES(int, i)
EIGEN_MAKE_TYPEDEFS_ALL_SIZES(float, f) EIGEN_MAKE_TYPEDEFS_ALL_SIZES(float, f)

View File

@ -480,6 +480,15 @@ typedef Transform<double,2> Transform2d;
/** \ingroup Geometry_Module */ /** \ingroup Geometry_Module */
typedef Transform<double,3> Transform3d; typedef Transform<double,3> Transform3d;
/** \ingroup Geometry_Module */
typedef Transform<float,2,Isometry> Isometry2f;
/** \ingroup Geometry_Module */
typedef Transform<float,3,Isometry> Isometry3f;
/** \ingroup Geometry_Module */
typedef Transform<double,2,Isometry> Isometry2d;
/** \ingroup Geometry_Module */
typedef Transform<double,3,Isometry> Isometry3d;
/** \ingroup Geometry_Module */ /** \ingroup Geometry_Module */
typedef Transform<float,2> Affine2f; typedef Transform<float,2> Affine2f;
/** \ingroup Geometry_Module */ /** \ingroup Geometry_Module */
@ -512,7 +521,7 @@ typedef Transform<double,3,Projective> Projective3d;
**************************/ **************************/
#ifdef EIGEN_QT_SUPPORT #ifdef EIGEN_QT_SUPPORT
/** Initialises \c *this from a QMatrix assuming the dimension is 2. /** Initializes \c *this from a QMatrix assuming the dimension is 2.
* *
* This function is available only if the token EIGEN_QT_SUPPORT is defined. * This function is available only if the token EIGEN_QT_SUPPORT is defined.
*/ */
@ -538,7 +547,7 @@ Transform<Scalar,Dim,Mode>& Transform<Scalar,Dim,Mode>::operator=(const QMatrix&
/** \returns a QMatrix from \c *this assuming the dimension is 2. /** \returns a QMatrix from \c *this assuming the dimension is 2.
* *
* \warning this convertion might loss data if \c *this is not affine * \warning this conversion might loss data if \c *this is not affine
* *
* This function is available only if the token EIGEN_QT_SUPPORT is defined. * This function is available only if the token EIGEN_QT_SUPPORT is defined.
*/ */
@ -551,7 +560,7 @@ QMatrix Transform<Scalar,Dim,Mode>::toQMatrix(void) const
matrix.coeff(0,2), matrix.coeff(1,2)); matrix.coeff(0,2), matrix.coeff(1,2));
} }
/** Initialises \c *this from a QTransform assuming the dimension is 2. /** Initializes \c *this from a QTransform assuming the dimension is 2.
* *
* This function is available only if the token EIGEN_QT_SUPPORT is defined. * This function is available only if the token EIGEN_QT_SUPPORT is defined.
*/ */
@ -881,7 +890,7 @@ Transform<Scalar,Dim,Mode>::fromPositionOrientationScale(const MatrixBase<Positi
* \returns the inverse transformation according to some given knowledge * \returns the inverse transformation according to some given knowledge
* on \c *this. * on \c *this.
* *
* \param traits allows to optimize the inversion process when the transformion * \param traits allows to optimize the inversion process when the transformation
* is known to be not a general transformation. The possible values are: * is known to be not a general transformation. The possible values are:
* - Projective if the transformation is not necessarily affine, i.e., if the * - Projective if the transformation is not necessarily affine, i.e., if the
* last row is not guaranteed to be [0 ... 0 1] * last row is not guaranteed to be [0 ... 0 1]
@ -950,7 +959,7 @@ struct ei_transform_take_affine_part<Transform<Scalar,Dim,AffineCompact> > {
}; };
/***************************************************** /*****************************************************
*** Specializations of construct from matix *** *** Specializations of construct from matrix ***
*****************************************************/ *****************************************************/
template<typename Other, int Mode, int Dim, int HDim> template<typename Other, int Mode, int Dim, int HDim>