|
SplineTraits< Spline >::BasisDerivativeType | basisFunctionDerivatives (Scalar u, DenseIndex order) const |
| Computes the non-zero spline basis function derivatives up to given order. More...
|
|
template<int DerivativeOrder> |
SplineTraits< Spline, DerivativeOrder >::BasisDerivativeType | basisFunctionDerivatives (Scalar u, DenseIndex order=DerivativeOrder) const |
| Computes the non-zero spline basis function derivatives up to given order. More...
|
|
SplineTraits< Spline >::BasisVectorType | basisFunctions (Scalar u) const |
| Computes the non-zero basis functions at the given site. More...
|
|
const ControlPointVectorType & | ctrls () const |
| Returns the ctrls of the underlying spline. More...
|
|
DenseIndex | degree () const |
| Returns the spline degree. More...
|
|
SplineTraits< Spline >::DerivativeType | derivatives (Scalar u, DenseIndex order) const |
| Evaluation of spline derivatives of up-to given order. More...
|
|
template<int DerivativeOrder> |
SplineTraits< Spline, DerivativeOrder >::DerivativeType | derivatives (Scalar u, DenseIndex order=DerivativeOrder) const |
| Evaluation of spline derivatives of up-to given order. More...
|
|
const KnotVectorType & | knots () const |
| Returns the knots of the underlying spline. More...
|
|
PointType | operator() (Scalar u) const |
| Returns the spline value at a given site \(u\). More...
|
|
DenseIndex | span (Scalar u) const |
| Returns the span within the knot vector in which u is falling. More...
|
|
| Spline () |
| Creates a (constant) zero spline. For Splines with dynamic degree, the resulting degree will be 0. More...
|
|
template<typename OtherVectorType , typename OtherArrayType > |
| Spline (const OtherVectorType &knots, const OtherArrayType &ctrls) |
| Creates a spline from a knot vector and control points. More...
|
|
template<int OtherDegree> |
| Spline (const Spline< Scalar, Dimension, OtherDegree > &spline) |
| Copy constructor for splines. More...
|
|
template<typename Scalar_, int Dim_, int Degree_>
class Eigen::Spline< Scalar_, Dim_, Degree_ >
A class representing multi-dimensional spline curves.
The class represents B-splines with non-uniform knot vectors. Each control point of the B-spline is associated with a basis function
\begin{align*} C(u) & = \sum_{i=0}^{n}N_{i,p}(u)P_i \end{align*}
- Template Parameters
-
Scalar_ | The underlying data type (typically float or double) |
Dim_ | The curve dimension (e.g. 2 or 3) |
Degree_ | Per default set to Dynamic; could be set to the actual desired degree for optimization purposes (would result in stack allocation of several temporary variables). |
Definition at line 37 of file Spline.h.
template<typename Scalar_ , int Dim_, int Degree_>
Computes the non-zero spline basis function derivatives up to given order.
The function computes
\begin{align*} \frac{d^i}{du^i} N_{i,p}(u), \hdots, \frac{d^i}{du^i} N_{i+p+1,p}(u) \end{align*}
with i ranging from 0 up to the specified order.
- Parameters
-
u | Parameter \(u \in [0;1]\) at which the non-zero basis function derivatives are computed. |
order | The order up to which the basis function derivatives are computes. |
degree | The degree of the underlying spline |
knots | The underlying spline's knot vector. |
Definition at line 497 of file Spline.h.
503 typename SplineTraits<Spline>::BasisDerivativeType der;
DenseIndex degree() const
Returns the spline degree.
static void BasisFunctionDerivativesImpl(const typename Spline< Scalar_, Dim_, Degree_ >::Scalar u, const DenseIndex order, const DenseIndex p, const typename Spline< Scalar_, Dim_, Degree_ >::KnotVectorType &U, DerivativeType &N_)
template<typename Scalar_ , int Dim_, int Degree_>
Computes the non-zero spline basis function derivatives up to given order.
The function computes
\begin{align*} \frac{d^i}{du^i} N_{i,p}(u), \hdots, \frac{d^i}{du^i} N_{i+p+1,p}(u) \end{align*}
with i ranging from 0 up to the specified order.
- Parameters
-
u | Parameter \(u \in [0;1]\) at which the non-zero basis function derivatives are computed. |
order | The order up to which the basis function derivatives are computes. |
Definition at line 478 of file Spline.h.
SplineTraits< Spline >::BasisDerivativeType BasisDerivativeType
The data type used to store the values of the basis function derivatives.
template<typename Scalar_ , int Dim_, int Degree_>
template<int DerivativeOrder>
Computes the non-zero spline basis function derivatives up to given order.
The function computes
\begin{align*} \frac{d^i}{du^i} N_{i,p}(u), \hdots, \frac{d^i}{du^i} N_{i+p+1,p}(u) \end{align*}
with i ranging from 0 up to the specified order.
- Parameters
-
u | Parameter \(u \in [0;1]\) at which the non-zero basis function derivatives are computed. |
order | The order up to which the basis function derivatives are computes. Using the template version of this function is more efficieent since temporary objects are allocated on the stack whenever this is possible. |
template<typename Scalar_ , int Dim_, int Degree_>
Computes the non-zero basis functions at the given site.
Splines have local support and a point from their image is defined by exactly \(p+1\) control points \(P_i\) where \(p\) is the spline degree.
This function computes the \(p+1\) non-zero basis function values for a given parameter value \(u\). It returns
\begin{align*} N_{i,p}(u), \hdots, N_{i+p+1,p}(u) \end{align*}
- Parameters
-
u | Parameter \(u \in [0;1]\) at which the non-zero basis functions are computed. |
Definition at line 363 of file Spline.h.
static BasisVectorType BasisFunctions(Scalar u, DenseIndex degree, const KnotVectorType &knots)
Returns the spline's non-zero basis functions.
template<typename Scalar_ , int Dim_, int Degree_>
Returns the spline's non-zero basis functions.
The function computes and returns
\begin{align*} N_{i,p}(u), \hdots, N_{i+p+1,p}(u) \end{align*}
- Parameters
-
u | The site at which the basis functions are computed. |
degree | The degree of the underlying spline. |
knots | The underlying spline's knot vector. |
Definition at line 249 of file Spline.h.
262 VectorBlock<BasisVectorType,Degree>(left,1,p) = u - VectorBlock<const KnotVectorType,Degree>(U,i+1-p,p).reverse();
263 VectorBlock<BasisVectorType,Degree>(right,1,p) = VectorBlock<const KnotVectorType,Degree>(U,i+1,p) - u;
272 const Scalar tmp = N(r)/(right(r+1)+left(j-r));
273 N[r] = saved + right(r+1)*tmp;
274 saved = left(j-r)*tmp;
static DenseIndex Span(typename SplineTraits< Spline >::Scalar u, DenseIndex degree, const typename SplineTraits< Spline >::KnotVectorType &knots)
Computes the span within the provided knot vector in which u is falling.
SplineTraits< Spline >::KnotVectorType KnotVectorType
The data type used to store knot vectors.
template<typename Scalar_ , int Dim_, int Degree_>
Evaluation of spline derivatives of up-to given order.
The function returns
\begin{align*} \frac{d^i}{du^i}C(u) & = \sum_{i=0}^{n} \frac{d^i}{du^i} N_{i,p}(u)P_i \end{align*}
for i ranging between 0 and order.
- Parameters
-
u | Parameter \(u \in [0;1]\) at which the spline derivative is evaluated. |
order | The order up to which the derivatives are computed. |
Definition at line 344 of file Spline.h.
346 typename SplineTraits< Spline >::DerivativeType
res;
cout<< "Here is the matrix m:"<< endl<< m<< endl;Matrix< ptrdiff_t, 3, 1 > res
void derivativesImpl(const SplineType &spline, typename SplineType::Scalar u, DenseIndex order, DerivativeType &der)
template<typename Scalar_ , int Dim_, int Degree_>
template<int DerivativeOrder>
Evaluation of spline derivatives of up-to given order.
The function returns
\begin{align*} \frac{d^i}{du^i}C(u) & = \sum_{i=0}^{n} \frac{d^i}{du^i} N_{i,p}(u)P_i \end{align*}
for i ranging between 0 and order.
- Parameters
-
u | Parameter \(u \in [0;1]\) at which the spline derivative is evaluated. |
order | The order up to which the derivatives are computed. Using the template version of this function is more efficieent since temporary objects are allocated on the stack whenever this is possible. |