add eigen2support Transform typedefs, add Eigen2To3 section on Transform

This commit is contained in:
Benoit Jacob 2010-10-29 09:00:35 -04:00
parent bd249d1121
commit 99ccb26cfe
3 changed files with 60 additions and 6 deletions

View File

@ -50,6 +50,7 @@ namespace Eigen {
#include "src/Eigen2Support/Block.h"
#include "src/Eigen2Support/VectorBlock.h"
#include "src/Eigen2Support/Minor.h"
#include "src/Eigen2Support/Transform.h"
} // namespace Eigen

View File

@ -0,0 +1,37 @@
// This file is part of Eigen, a lightweight C++ template library
// for linear algebra.
//
// Copyright (C) 2010 Benoit Jacob <jacob.benoit.1@gmail.com>
//
// Eigen is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// version 3 of the License, or (at your option) any later version.
//
// Alternatively, you can redistribute it and/or
// modify it under the terms of the GNU General Public License as
// published by the Free Software Foundation; either version 2 of
// the License, or (at your option) any later version.
//
// Eigen is distributed in the hope that it will be useful, but WITHOUT ANY
// WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
// FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License or the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License and a copy of the GNU General Public License along with
// Eigen. If not, see <http://www.gnu.org/licenses/>.
#ifndef EIGEN_TRANSFORM2_H
#define EIGEN_TRANSFORM2_H
/** \ingroup Geometry_Module */
typedef Projective2f Transform2f;
/** \ingroup Geometry_Module */
typedef Projective2d Transform2d;
/** \ingroup Geometry_Module */
typedef Projective3f Transform3f;
/** \ingroup Geometry_Module */
typedef Projective3d Transform3d;
#endif // EIGEN_TRANSFORM2_H

View File

@ -7,6 +7,7 @@ and gives tips to help porting your application from Eigen2 to Eigen3.
\b Table \b of \b contents
- \ref CompatibilitySupport
- \ref Using
- \ref VectorBlocks
- \ref Corners
- \ref CoefficientWiseOperations
@ -14,7 +15,7 @@ and gives tips to help porting your application from Eigen2 to Eigen3.
- \ref TriangularSolveInPlace
- \ref Decompositions
- \ref LinearSolvers
- \ref Using
- \ref Transform
- \ref LazyVsNoalias
- \ref AlignMacros
- \ref AlignedMap
@ -23,6 +24,13 @@ and gives tips to help porting your application from Eigen2 to Eigen3.
In order to ease the switch from Eigen2 to Eigen3, Eigen3 features a compatibility mode which can be enabled by defining the EIGEN2_SUPPORT preprocessor token \b before including any Eigen header (typically it should be set in your project options).
\section Using The USING_PART_OF_NAMESPACE_EIGEN macro
The USING_PART_OF_NAMESPACE_EIGEN macro has been removed. In Eigen 3, just do:
\code
using namespace Eigen;
\endcode
\section VectorBlocks Vector blocks
<table class="manual">
@ -219,12 +227,20 @@ the selfadjointView API allows you to select the \n
triangular part to work on</td></tr>
</table>
\section Using The USING_PART_OF_NAMESPACE_EIGEN macro
\section Transform The Transform class
The USING_PART_OF_NAMESPACE_EIGEN macro has been removed. In Eigen 3, just do:
\code
using namespace Eigen;
\endcode
In Eigen 2, the Transform class didn't really know whether it was a projective or affine transformation. In Eigen 3, it takes a new \a Mode template parameter, which indicates whether it's \a Projective or \a Affine transform. The default is \a Projective.
The Transform3f (etc) typedefs are no more. In Eigen 3, the Transform typedefs explicitly refer to the \a Projective and \a Affine modes:
<table class="manual">
<tr><th>Eigen 2</th><th>Eigen 3</th><th>Notes</th></tr>
<tr>
<td> Transform3f </td>
<td> Affine3f or Projective3f </td>
<td> Of course 3f is just an example here </td>
</tr>
</table>
\section LazyVsNoalias Lazy evaluation and noalias