Compute a single knot vector from sample grid and degree
| 334 | |
| 335 | // Compute a single knot vector from sample grid and degree |
| 336 | std::vector<double> BSpline::Builder::computeKnotVector(const std::vector<double> &values, |
| 337 | unsigned int degree, |
| 338 | unsigned int numBasisFunctions) const |
| 339 | { |
| 340 | switch (_knotSpacing) |
| 341 | { |
| 342 | case KnotSpacing::AS_SAMPLED: |
| 343 | return knotVectorMovingAverage(values, degree); |
| 344 | case KnotSpacing::EQUIDISTANT: |
| 345 | return knotVectorEquidistant(values, degree, numBasisFunctions); |
| 346 | case KnotSpacing::EXPERIMENTAL: |
| 347 | return knotVectorBuckets(values, degree); |
| 348 | default: |
| 349 | return knotVectorMovingAverage(values, degree); |
| 350 | } |
| 351 | } |
| 352 | |
| 353 | /* |
| 354 | * Automatic construction of (p+1)-regular knot vector |
nothing calls this directly
no outgoing calls
no test coverage detected