diff --git a/Eigen/Eigen2Support b/Eigen/Eigen2Support index 1503d5cec..513fc0d4e 100644 --- a/Eigen/Eigen2Support +++ b/Eigen/Eigen2Support @@ -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 diff --git a/Eigen/src/Eigen2Support/Transform.h b/Eigen/src/Eigen2Support/Transform.h new file mode 100644 index 000000000..1aad1cc29 --- /dev/null +++ b/Eigen/src/Eigen2Support/Transform.h @@ -0,0 +1,37 @@ +// This file is part of Eigen, a lightweight C++ template library +// for linear algebra. +// +// Copyright (C) 2010 Benoit Jacob +// +// 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 . + +#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 diff --git a/doc/A05_PortingFrom2To3.dox b/doc/A05_PortingFrom2To3.dox index b64b0fec4..3cfae061e 100644 --- a/doc/A05_PortingFrom2To3.dox +++ b/doc/A05_PortingFrom2To3.dox @@ -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 @@ -219,12 +227,20 @@ the selfadjointView API allows you to select the \n triangular part to work on
-\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: + + + + + + + + +
Eigen 2Eigen 3Notes
Transform3f Affine3f or Projective3f Of course 3f is just an example here
\section LazyVsNoalias Lazy evaluation and noalias