Reen::BSplineBasis Class Reference

#include <ApproxSurface.h>

Public Member Functions

virtual void AllBasisFunctions (double fParam, TColStd_Array1OfReal &vFuncVals)
 Calculates the function values of the basic functions that do not vanish at fParam. More...
 
virtual double BasisFunction (int iIndex, double fParam)
 Calculates the function value Nik(t) at the point fParam (from: Piegl/Tiller 96 The NURBS-Book) More...
 
 BSplineBasis (int iSize)
 Constructor. More...
 
 BSplineBasis (TColStd_Array1OfReal &vKnots, int iOrder=1)
 Constructor. More...
 
 BSplineBasis (TColStd_Array1OfReal &vKnots, TColStd_Array1OfInteger &vMults, int iSize, int iOrder=1)
 Constructor. More...
 
virtual double DerivativeOfBasisFunction (int iIndex, int k, double fParam)
 Calculates the kth derivative at the point fParam. More...
 
virtual void DerivativesOfBasisFunction (int iIndex, int iMaxDer, double fParam, TColStd_Array1OfReal &Derivat)
 Calculates the function values of the first iMaxDer derivatives at the point fParam (from: Piegl/Tiller 96 The NURBS-Book) More...
 
virtual int FindSpan (double fParam)
 Specifies the knot index for the parameter value (from: Piegl/Tiller 96 The NURBS-Book) More...
 
virtual double GetIntegralOfProductOfBSplines (int i, int j, int r, int s)
 Calculates the integral of the product of two B-splines or their derivatives. More...
 
virtual ValueT LocalSupport (int iIndex, double fParam)
 Specifies whether the function value Nik(t) at the position fParam results in 0, 1 or a value in between. More...
 
virtual ~BSplineBasis ()
 Destructor. More...
 
- Public Member Functions inherited from Reen::SplineBasisfunction
virtual double BasisFunction (int iIndex, double fParam)=0
 Calculates the function value Nik(t) at the point fParam (from: Piegl/Tiller 96 The NURBS-Book) More...
 
virtual double DerivativeOfBasisFunction (int iIndex, int k, double fParam)=0
 Calculates the kth derivative at the point fParam. More...
 
virtual void DerivativesOfBasisFunction (int iIndex, int iMaxDer, double fParam, TColStd_Array1OfReal &Derivat)=0
 Calculates the function values of the first iMaxDer derivatives on the fParam position (from: Piegl/Tiller 96 The NURBS-Book) More...
 
virtual ValueT LocalSupport (int iIndex, double fParam)=0
 Indicates whether the function value Nik(t) at the point fParam results in 0, 1 or a value in between. More...
 
virtual void SetKnots (TColStd_Array1OfReal &vKnots, int iOrder=1)
 Sets the knot vector and the order. More...
 
virtual void SetKnots (TColStd_Array1OfReal &vKnots, TColStd_Array1OfInteger &vMults, int iOrder=1)
 Sets the knot vector and the order. More...
 
 SplineBasisfunction (int iSize)
 Constructor. More...
 
 SplineBasisfunction (TColStd_Array1OfReal &vKnots, int iOrder=1)
 Constructor. More...
 
 SplineBasisfunction (TColStd_Array1OfReal &vKnots, TColStd_Array1OfInteger &vMults, int iSize, int iOrder=1)
 Constructor. More...
 
virtual ~SplineBasisfunction ()
 

Protected Member Functions

int CalcSize (int r, int s)
 Calculates the number of roots/weights of the Legendre-Polynomials to be used as a function of the degree. More...
 
virtual void FindIntegrationArea (int iIdx1, int iIdx2, int &iBegin, int &iEnd)
 Calculates the limits of integration (Indexes of the knots) More...
 
virtual void GenerateRootsAndWeights (TColStd_Array1OfReal &vAbscissas, TColStd_Array1OfReal &vWeights)
 Calculates the roots of the Legendre-Polynomials and the corresponding weights. More...
 

Additional Inherited Members

- Public Types inherited from Reen::SplineBasisfunction
enum  ValueT { Zero = 0 , Full , Other }
 

Constructor & Destructor Documentation

◆ BSplineBasis() [1/3]

BSplineBasis::BSplineBasis ( int  iSize)

Constructor.

Parameters
iSizeLength of the knot vector

◆ BSplineBasis() [2/3]

BSplineBasis::BSplineBasis ( TColStd_Array1OfReal &  vKnots,
int  iOrder = 1 
)

Constructor.

Parameters
vKnotsKnot vector
iOrderOrder (degree + 1) of the basic polynomial

◆ BSplineBasis() [3/3]

BSplineBasis::BSplineBasis ( TColStd_Array1OfReal &  vKnots,
TColStd_Array1OfInteger &  vMults,
int  iSize,
int  iOrder = 1 
)

Constructor.

Parameters
vKnotsKnot vector of shape (value)
vMultsKnot vector of shape (multiplicity)
iSizeLength of the knot vector The arrays vKnots and vMults have to be of the same size and the sum of the values in vMults has to be identical to iSize.
iOrderOrder (degree + 1) of the basic polynomial

◆ ~BSplineBasis()

BSplineBasis::~BSplineBasis ( )

Destructor.

Member Function Documentation

◆ AllBasisFunctions()

void BSplineBasis::AllBasisFunctions ( double  fParam,
TColStd_Array1OfReal &  vFuncVals 
)
virtual

Calculates the function values of the basic functions that do not vanish at fParam.

It must be ensured that the list for d (= degree of the B-spline) elements (0, ..., d-1) is sufficient (from: Piegl/Tiller 96 The NURBS-Book)

Parameters
fParamParameter
vFuncValsList of function values Index, Parameter value

References FindSpan().

◆ BasisFunction()

double BSplineBasis::BasisFunction ( int  iIndex,
double  fParam 
)
virtual

Calculates the function value Nik(t) at the point fParam (from: Piegl/Tiller 96 The NURBS-Book)

Parameters
iIndexIndex
fParamParameter value
Returns
Function value Nik(t)

Implements Reen::SplineBasisfunction.

Referenced by DerivativeOfBasisFunction().

◆ CalcSize()

int BSplineBasis::CalcSize ( int  r,
int  s 
)
protected

Calculates the number of roots/weights of the Legendre-Polynomials to be used as a function of the degree.

Referenced by GetIntegralOfProductOfBSplines().

◆ DerivativeOfBasisFunction()

double BSplineBasis::DerivativeOfBasisFunction ( int  iIndex,
int  k,
double  fParam 
)
virtual

Calculates the kth derivative at the point fParam.

Implements Reen::SplineBasisfunction.

References BasisFunction().

Referenced by GetIntegralOfProductOfBSplines().

◆ DerivativesOfBasisFunction()

void BSplineBasis::DerivativesOfBasisFunction ( int  iIndex,
int  iMaxDer,
double  fParam,
TColStd_Array1OfReal &  Derivat 
)
virtual

Calculates the function values of the first iMaxDer derivatives at the point fParam (from: Piegl/Tiller 96 The NURBS-Book)

Parameters
iIndexIndex
iMaxDermax. derivative
fParamParameter value
DerivatThe list must be sufficiently long for iMaxDer+1 elements.
Returns
List of function values

Implements Reen::SplineBasisfunction.

◆ FindIntegrationArea()

void BSplineBasis::FindIntegrationArea ( int  iIdx1,
int  iIdx2,
int iBegin,
int iEnd 
)
protectedvirtual

Calculates the limits of integration (Indexes of the knots)

Referenced by GetIntegralOfProductOfBSplines().

◆ FindSpan()

int BSplineBasis::FindSpan ( double  fParam)
virtual

Specifies the knot index for the parameter value (from: Piegl/Tiller 96 The NURBS-Book)

Parameters
fParamParameter value
Returns
Knot index

Referenced by AllBasisFunctions().

◆ GenerateRootsAndWeights()

void BSplineBasis::GenerateRootsAndWeights ( TColStd_Array1OfReal &  vAbscissas,
TColStd_Array1OfReal &  vWeights 
)
protectedvirtual

Calculates the roots of the Legendre-Polynomials and the corresponding weights.

Referenced by GetIntegralOfProductOfBSplines().

◆ GetIntegralOfProductOfBSplines()

double BSplineBasis::GetIntegralOfProductOfBSplines ( int  i,
int  j,
int  r,
int  s 
)
virtual

Calculates the integral of the product of two B-splines or their derivatives.

The integration area extends over the entire domain of definition. The integral is calculated by means of the Gaussian quadrature formulas.

References CalcSize(), DerivativeOfBasisFunction(), FindIntegrationArea(), and GenerateRootsAndWeights().

◆ LocalSupport()

BSplineBasis::ValueT BSplineBasis::LocalSupport ( int  iIndex,
double  fParam 
)
virtual

Specifies whether the function value Nik(t) at the position fParam results in 0, 1 or a value in between.

This serves to speed up the calculation under certain circumstances.

Parameters
iIndexIndex
fParamParameter value
Returns
ValueT

Implements Reen::SplineBasisfunction.

References Reen::SplineBasisfunction::Full, Reen::SplineBasisfunction::Other, and Reen::SplineBasisfunction::Zero.


The documentation for this class was generated from the following files: