All Classes Namespaces Functions Variables Typedefs Enumerator Groups Pages
SplineFwd.h
1 // This file is part of Eigen, a lightweight C++ template library
2 // for linear algebra.
3 //
4 // Copyright (C) 20010-2011 Hauke Heibel <hauke.heibel@gmail.com>
5 //
6 // This Source Code Form is subject to the terms of the Mozilla
7 // Public License v. 2.0. If a copy of the MPL was not distributed
8 // with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 
10 #ifndef EIGEN_SPLINES_FWD_H
11 #define EIGEN_SPLINES_FWD_H
12 
13 #include <Eigen/Core>
14 
15 namespace Eigen
16 {
17  template <typename Scalar, int Dim, int Degree = Dynamic> class Spline;
18 
19  template < typename SplineType, int DerivativeOrder = Dynamic > struct SplineTraits {};
20 
25  template <typename _Scalar, int _Dim, int _Degree>
26  struct SplineTraits< Spline<_Scalar, _Dim, _Degree>, Dynamic >
27  {
28  typedef _Scalar Scalar;
29  enum { Dimension = _Dim };
30  enum { Degree = _Degree };
31 
32  enum { OrderAtCompileTime = _Degree==Dynamic ? Dynamic : _Degree+1 };
33  enum { NumOfDerivativesAtCompileTime = OrderAtCompileTime };
34 
36  typedef Array<Scalar,1,OrderAtCompileTime> BasisVectorType;
37 
39  typedef Array<Scalar,Dynamic,Dynamic,RowMajor,NumOfDerivativesAtCompileTime,OrderAtCompileTime> BasisDerivativeType;
40 
42  typedef Array<Scalar,Dimension,Dynamic,ColMajor,Dimension,NumOfDerivativesAtCompileTime> DerivativeType;
43 
45  typedef Array<Scalar,Dimension,1> PointType;
46 
48  typedef Array<Scalar,1,Dynamic> KnotVectorType;
49 
51  typedef Array<Scalar,Dimension,Dynamic> ControlPointVectorType;
52  };
53 
60  template < typename _Scalar, int _Dim, int _Degree, int _DerivativeOrder >
61  struct SplineTraits< Spline<_Scalar, _Dim, _Degree>, _DerivativeOrder > : public SplineTraits< Spline<_Scalar, _Dim, _Degree> >
62  {
63  enum { OrderAtCompileTime = _Degree==Dynamic ? Dynamic : _Degree+1 };
64  enum { NumOfDerivativesAtCompileTime = _DerivativeOrder==Dynamic ? Dynamic : _DerivativeOrder+1 };
65 
67  typedef Array<_Scalar,Dynamic,Dynamic,RowMajor,NumOfDerivativesAtCompileTime,OrderAtCompileTime> BasisDerivativeType;
68 
70  typedef Array<_Scalar,_Dim,Dynamic,ColMajor,_Dim,NumOfDerivativesAtCompileTime> DerivativeType;
71  };
72 
75 
78 
81 
84 }
85 
86 #endif // EIGEN_SPLINES_FWD_H