File indexing completed on 2025-01-18 09:57:10
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010 #ifndef EIGEN_SPLINES_FWD_H
0011 #define EIGEN_SPLINES_FWD_H
0012
0013 #include "../../../../Eigen/Core"
0014
0015 namespace Eigen
0016 {
0017 template <typename Scalar, int Dim, int Degree = Dynamic> class Spline;
0018
0019 template < typename SplineType, int DerivativeOrder = Dynamic > struct SplineTraits {};
0020
0021
0022
0023
0024
0025 template <typename _Scalar, int _Dim, int _Degree>
0026 struct SplineTraits< Spline<_Scalar, _Dim, _Degree>, Dynamic >
0027 {
0028 typedef _Scalar Scalar;
0029 enum { Dimension = _Dim };
0030 enum { Degree = _Degree };
0031
0032 enum { OrderAtCompileTime = _Degree==Dynamic ? Dynamic : _Degree+1 };
0033 enum { NumOfDerivativesAtCompileTime = OrderAtCompileTime };
0034
0035 enum { DerivativeMemoryLayout = Dimension==1 ? RowMajor : ColMajor };
0036
0037
0038 typedef Array<Scalar,1,OrderAtCompileTime> BasisVectorType;
0039
0040
0041 typedef Array<Scalar,Dynamic,Dynamic,RowMajor,NumOfDerivativesAtCompileTime,OrderAtCompileTime> BasisDerivativeType;
0042
0043
0044 typedef Array<Scalar,Dimension,Dynamic,DerivativeMemoryLayout,Dimension,NumOfDerivativesAtCompileTime> DerivativeType;
0045
0046
0047 typedef Array<Scalar,Dimension,1> PointType;
0048
0049
0050 typedef Array<Scalar,1,Dynamic> KnotVectorType;
0051
0052
0053 typedef Array<Scalar,1,Dynamic> ParameterVectorType;
0054
0055
0056 typedef Array<Scalar,Dimension,Dynamic> ControlPointVectorType;
0057 };
0058
0059
0060
0061
0062
0063
0064
0065 template < typename _Scalar, int _Dim, int _Degree, int _DerivativeOrder >
0066 struct SplineTraits< Spline<_Scalar, _Dim, _Degree>, _DerivativeOrder > : public SplineTraits< Spline<_Scalar, _Dim, _Degree> >
0067 {
0068 enum { OrderAtCompileTime = _Degree==Dynamic ? Dynamic : _Degree+1 };
0069 enum { NumOfDerivativesAtCompileTime = _DerivativeOrder==Dynamic ? Dynamic : _DerivativeOrder+1 };
0070
0071 enum { DerivativeMemoryLayout = _Dim==1 ? RowMajor : ColMajor };
0072
0073
0074 typedef Array<_Scalar,Dynamic,Dynamic,RowMajor,NumOfDerivativesAtCompileTime,OrderAtCompileTime> BasisDerivativeType;
0075
0076
0077 typedef Array<_Scalar,_Dim,Dynamic,DerivativeMemoryLayout,_Dim,NumOfDerivativesAtCompileTime> DerivativeType;
0078 };
0079
0080
0081 typedef Spline<float,2> Spline2f;
0082
0083
0084 typedef Spline<float,3> Spline3f;
0085
0086
0087 typedef Spline<double,2> Spline2d;
0088
0089
0090 typedef Spline<double,3> Spline3d;
0091 }
0092
0093 #endif