$treeview $search $mathjax
Eigen-unsupported
3.2.5
$projectbrief
|
$projectbrief
|
$searchbox |
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 00036 typedef Array<Scalar,1,OrderAtCompileTime> BasisVectorType; 00037 00039 typedef Array<Scalar,Dynamic,Dynamic,RowMajor,NumOfDerivativesAtCompileTime,OrderAtCompileTime> BasisDerivativeType; 00040 00042 typedef Array<Scalar,Dimension,Dynamic,ColMajor,Dimension,NumOfDerivativesAtCompileTime> DerivativeType; 00043 00045 typedef Array<Scalar,Dimension,1> PointType; 00046 00048 typedef Array<Scalar,1,Dynamic> KnotVectorType; 00049 00051 typedef Array<Scalar,Dimension,Dynamic> ControlPointVectorType; 00052 }; 00053 00060 template < typename _Scalar, int _Dim, int _Degree, int _DerivativeOrder > 00061 struct SplineTraits< Spline<_Scalar, _Dim, _Degree>, _DerivativeOrder > : public SplineTraits< Spline<_Scalar, _Dim, _Degree> > 00062 { 00063 enum { OrderAtCompileTime = _Degree==Dynamic ? Dynamic : _Degree+1 }; 00064 enum { NumOfDerivativesAtCompileTime = _DerivativeOrder==Dynamic ? Dynamic : _DerivativeOrder+1 }; 00065 00067 typedef Array<_Scalar,Dynamic,Dynamic,RowMajor,NumOfDerivativesAtCompileTime,OrderAtCompileTime> BasisDerivativeType; 00068 00070 typedef Array<_Scalar,_Dim,Dynamic,ColMajor,_Dim,NumOfDerivativesAtCompileTime> DerivativeType; 00071 }; 00072 00074 typedef Spline<float,2> Spline2f; 00075 00077 typedef Spline<float,3> Spline3f; 00078 00080 typedef Spline<double,2> Spline2d; 00081 00083 typedef Spline<double,3> Spline3d; 00084 } 00085 00086 #endif // EIGEN_SPLINES_FWD_H