// This file is part of Eigen, a lightweight C++ template library // for linear algebra. // // Copyright (C) 20010-2011 Hauke Heibel // // 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_SPLINES_FWD_H #define EIGEN_SPLINES_FWD_H #include namespace Eigen { template class Spline; template < typename SplineType, int _DerivativeOrder = Dynamic > struct SplineTraits {}; // hide specializations from doxygen #ifndef DOXYGEN_SHOULD_SKIP_THIS template struct SplineTraits< Spline<_Scalar, _Dim, _Degree>, Dynamic > { typedef _Scalar Scalar; /* The underlying scalar value. */ enum { Dimension = _Dim }; /* The spline curve's dimension. */ enum { Degree = _Degree }; /* The spline curve's degree. */ enum { OrderAtCompileTime = _Degree==Dynamic ? Dynamic : _Degree+1 }; enum { NumOfDerivativesAtCompileTime = OrderAtCompileTime }; typedef Array BasisVectorType; typedef Array BasisDerivativeType; typedef Array DerivativeType; typedef Array PointType; typedef Array KnotVectorType; typedef Array ControlPointVectorType; }; template < typename _Scalar, int _Dim, int _Degree, int _DerivativeOrder > struct SplineTraits< Spline<_Scalar, _Dim, _Degree>, _DerivativeOrder > : public SplineTraits< Spline<_Scalar, _Dim, _Degree> > { enum { OrderAtCompileTime = _Degree==Dynamic ? Dynamic : _Degree+1 }; enum { NumOfDerivativesAtCompileTime = _DerivativeOrder==Dynamic ? Dynamic : _DerivativeOrder+1 }; typedef Array<_Scalar,Dynamic,Dynamic,RowMajor,NumOfDerivativesAtCompileTime,OrderAtCompileTime> BasisDerivativeType; typedef Array<_Scalar,_Dim,Dynamic,ColMajor,_Dim,NumOfDerivativesAtCompileTime> DerivativeType; }; #endif typedef Spline Spline2f; typedef Spline Spline3f; typedef Spline Spline2d; typedef Spline Spline3d; } #endif // EIGEN_SPLINES_FWD_H