![]() |
Eigen-unsupported
3.3.3
|
00001 // This file is part of Eigen, a lightweight C++ template library 00002 // for linear algebra. 00003 // 00004 // Copyright (C) 20010-2011 Hauke Heibel <hauke.heibel@gmail.com> 00005 // 00006 // This Source Code Form is subject to the terms of the Mozilla 00007 // Public License v. 2.0. If a copy of the MPL was not distributed 00008 // with this file, You can obtain one at http://mozilla.org/MPL/2.0/. 00009 00010 #ifndef EIGEN_SPLINES_FWD_H 00011 #define EIGEN_SPLINES_FWD_H 00012 00013 #include <Eigen/Core> 00014 00015 namespace Eigen 00016 { 00017 template <typename Scalar, int Dim, int Degree = Dynamic> class Spline; 00018 00019 template < typename SplineType, int DerivativeOrder = Dynamic > struct SplineTraits {}; 00020 00025 template <typename _Scalar, int _Dim, int _Degree> 00026 struct SplineTraits< Spline<_Scalar, _Dim, _Degree>, Dynamic > 00027 { 00028 typedef _Scalar Scalar; 00029 enum { Dimension = _Dim }; 00030 enum { Degree = _Degree }; 00031 00032 enum { OrderAtCompileTime = _Degree==Dynamic ? Dynamic : _Degree+1 }; 00033 enum { NumOfDerivativesAtCompileTime = OrderAtCompileTime }; 00034 00035 enum { DerivativeMemoryLayout = Dimension==1 ? RowMajor : ColMajor }; 00036 00038 typedef Array<Scalar,1,OrderAtCompileTime> BasisVectorType; 00039 00041 typedef Array<Scalar,Dynamic,Dynamic,RowMajor,NumOfDerivativesAtCompileTime,OrderAtCompileTime> BasisDerivativeType; 00042 00044 typedef Array<Scalar,Dimension,Dynamic,DerivativeMemoryLayout,Dimension,NumOfDerivativesAtCompileTime> DerivativeType; 00045 00047 typedef Array<Scalar,Dimension,1> PointType; 00048 00050 typedef Array<Scalar,1,Dynamic> KnotVectorType; 00051 00053 typedef Array<Scalar,1,Dynamic> ParameterVectorType; 00054 00056 typedef Array<Scalar,Dimension,Dynamic> ControlPointVectorType; 00057 }; 00058 00065 template < typename _Scalar, int _Dim, int _Degree, int _DerivativeOrder > 00066 struct SplineTraits< Spline<_Scalar, _Dim, _Degree>, _DerivativeOrder > : public SplineTraits< Spline<_Scalar, _Dim, _Degree> > 00067 { 00068 enum { OrderAtCompileTime = _Degree==Dynamic ? Dynamic : _Degree+1 }; 00069 enum { NumOfDerivativesAtCompileTime = _DerivativeOrder==Dynamic ? Dynamic : _DerivativeOrder+1 }; 00070 00071 enum { DerivativeMemoryLayout = _Dim==1 ? RowMajor : ColMajor }; 00072 00074 typedef Array<_Scalar,Dynamic,Dynamic,RowMajor,NumOfDerivativesAtCompileTime,OrderAtCompileTime> BasisDerivativeType; 00075 00077 typedef Array<_Scalar,_Dim,Dynamic,DerivativeMemoryLayout,_Dim,NumOfDerivativesAtCompileTime> DerivativeType; 00078 }; 00079 00081 typedef Spline<float,2> Spline2f; 00082 00084 typedef Spline<float,3> Spline3f; 00085 00087 typedef Spline<double,2> Spline2d; 00088 00090 typedef Spline<double,3> Spline3d; 00091 } 00092 00093 #endif // EIGEN_SPLINES_FWD_H