NurbsUtils.cc File Reference
#include <algorithm>
#include "NurbsUtils.h"
#include "Logger.h"

Namespaces

 NurbsUtils
 

Functions

bool NurbsUtils::isKnotVectorMonotonic (const std::vector< double > &knots)
 
bool NurbsUtils::close (double a, double b, double eps)
 
int NurbsUtils::findSpan (int degree, const std::vector< double > &knots, double u)
 
double NurbsUtils::bsplineOneBasis (int i, int deg, const std::vector< double > &U, double u)
 
void NurbsUtils::bsplineBasis (int deg, int span, const std::vector< double > &knots, double u, std::vector< double > &N)
 
void NurbsUtils::bsplineDerBasis (int deg, int span, const std::vector< double > &knots, double u, int nDers, std::vector< std::vector< double >> &ders)
 
std::vector< MdoubleNurbsUtils::createUniformKnotVector (unsigned int numberOfControlPoints, unsigned int degree, bool clampedAtStart, bool clampedAtEnd)
 Creates a uniform (clamped) knot vector. More...
 
void NurbsUtils::normalizeKnotVector (std::vector< Mdouble > &knots)
 Resets the knot vector to the interval [0, 1]. More...
 
void NurbsUtils::extendKnotVector (std::vector< Mdouble > &knots, unsigned int degree, unsigned int numStart, unsigned int numEnd, bool forceBothEndsUniform=false)
 Extends the knot vector for when control points have been added at the start or end. More...
 
Vec3D NurbsUtils::evaluate (Mdouble u, Mdouble v, std::vector< Mdouble > knotsU, std::vector< Mdouble > knotsV, std::vector< std::vector< Vec3D >> controlPoints, std::vector< std::vector< Mdouble >> weights)
 Evaluate point on a NURBS surface. More...