Basic Image AlgorithmS Library
2.8.0
|
Base class for NURBS classes. More...
#include <MathAlgo/Nurbs/NurbsBase.hh>
Public Member Functions | |
int | GetDegree () const |
Returns the degree of the NURBS. More... | |
double | GetKnot (int dim, int index) const |
Returns the position of a knot with a given index of a given dimension. More... | |
int | GetNumCtrlPts () const |
Returns the number of control points per dimension. More... | |
int | GetNumKnots () const |
Returns the number of knots of the NURBS. More... | |
NurbsBase (int knotsPerDim=4, int degree=2, int dimension=1) | |
Standard Constructor. More... | |
void | SetKnot (int dim, int index, double value) |
Set the position of a knot with a given index and of a given dimension. More... | |
~NurbsBase () | |
Empty Destructor (Virtual to make this whole thing polymorphic) More... | |
Protected Member Functions | |
double | BaseFunc (const int &dim, const int &knot, const int °ree, const double &u) const |
This is a serial implementation of the recursive nurbs evaluation. More... | |
double | BaseFunc (const int &dim, const int &knot, const int °ree, const double &u, double *&cachePointer) const |
This is a serial implementation of the recursive nurbs evaluation. More... | |
Protected Attributes | |
int | baseOps_ |
int | degree_ |
Degree of the b-splines. More... | |
int | knotsPerDim_ |
Number of knots in each dimension. More... | |
std::vector< std::vector < double > > | knotVector_ |
The vector of knot vectors (One for each dimension) More... | |
int | numCtrlPoints_ |
The number of control points per dimension. More... | |
Base class for NURBS classes.
The NURBS Base function is implemented here
Definition at line 29 of file NurbsBase.hh.
NurbsBase::NurbsBase | ( | int | knotsPerDim = 4 , |
int | degree = 2 , |
||
int | dimension = 1 |
||
) |
Standard Constructor.
knotsPerDim | The number of knots in the knot vector (without the dublications) |
degree | The degree of the b-splines |
dimension | The dimension of the parameter space! (not the control point space) |
Definition at line 16 of file NurbsBase.cpp.
|
inline |
Empty Destructor (Virtual to make this whole thing polymorphic)
Definition at line 40 of file NurbsBase.hh.
|
inlineprotected |
This is a serial implementation of the recursive nurbs evaluation.
Recursive function values are stored in the evaluation cache (evalCache_)
dim | The dimension (determines which knot vector is used) |
knot | The index of the knot in the knot vector |
degree | The current degree the function is evaluated in |
u | The parmeter for which the base function is evaluated |
Definition at line 108 of file NurbsBase.hh.
References knotVector_.
Referenced by BIAS::Nurbs1D< ControlPointsT >::EvalBaseFunc(), BIAS::Nurbs2D< ControlPointsT >::EvalBaseFunc(), and BIAS::Nurbs3D< ControlPointsT >::EvalBaseFunc().
|
inlineprotected |
This is a serial implementation of the recursive nurbs evaluation.
Recursive function values are stored in the evaluation cache (evalCache_) In this function, the cache pointer has to be provided in order to save the memory allocation time.
dim | The dimension (determines which knot vector is used) |
knot | The index of the knot in the knot vector |
degree | The current degree the function is evaluated in |
u | The parmeter for which the base function is evaluated |
cachePointer | The pointer to a cache, this function is allowed to use (already allocated). The size should be degree+1 |
Definition at line 152 of file NurbsBase.hh.
References knotVector_.
int NurbsBase::GetDegree | ( | ) | const |
Returns the degree of the NURBS.
Definition at line 61 of file NurbsBase.cpp.
double NurbsBase::GetKnot | ( | int | dim, |
int | index | ||
) | const |
Returns the position of a knot with a given index of a given dimension.
Definition at line 69 of file NurbsBase.cpp.
int NurbsBase::GetNumCtrlPts | ( | ) | const |
Returns the number of control points per dimension.
Definition at line 65 of file NurbsBase.cpp.
int NurbsBase::GetNumKnots | ( | ) | const |
Returns the number of knots of the NURBS.
Definition at line 57 of file NurbsBase.cpp.
void NurbsBase::SetKnot | ( | int | dim, |
int | index, | ||
double | value | ||
) |
Set the position of a knot with a given index and of a given dimension.
Definition at line 75 of file NurbsBase.cpp.
|
protected |
Definition at line 78 of file NurbsBase.hh.
|
protected |
Degree of the b-splines.
Definition at line 68 of file NurbsBase.hh.
Referenced by BIAS::Nurbs1D< ControlPointsT >::EvalBaseFunc(), BIAS::Nurbs2D< ControlPointsT >::EvalBaseFunc(), BIAS::Nurbs3D< ControlPointsT >::EvalBaseFunc(), BIAS::Nurbs1D< ControlPointsT >::GetRelevantBaseCtrlPoints(), BIAS::Nurbs2D< ControlPointsT >::GetRelevantBaseCtrlPoints(), and BIAS::Nurbs3D< ControlPointsT >::GetRelevantBaseCtrlPoints().
|
protected |
Number of knots in each dimension.
Definition at line 65 of file NurbsBase.hh.
|
protected |
The vector of knot vectors (One for each dimension)
Definition at line 62 of file NurbsBase.hh.
Referenced by BaseFunc(), BIAS::Nurbs1D< ControlPointsT >::GetRelevantBaseCtrlPoints(), BIAS::Nurbs2D< ControlPointsT >::GetRelevantBaseCtrlPoints(), and BIAS::Nurbs3D< ControlPointsT >::GetRelevantBaseCtrlPoints().
|
protected |
The number of control points per dimension.
Definition at line 71 of file NurbsBase.hh.
Referenced by BIAS::Nurbs1D< ControlPointsT >::GetCtrlPoint(), BIAS::Nurbs2D< ControlPointsT >::GetCtrlPoint(), BIAS::Nurbs3D< ControlPointsT >::GetCtrlPoint(), BIAS::Nurbs1D< ControlPointsT >::GetRelevantBaseCtrlPoints(), BIAS::Nurbs2D< ControlPointsT >::GetRelevantBaseCtrlPoints(), BIAS::Nurbs3D< ControlPointsT >::GetRelevantBaseCtrlPoints(), BIAS::Nurbs1D< ControlPointsT >::Nurbs1D(), BIAS::Nurbs2D< ControlPointsT >::Nurbs2D(), BIAS::Nurbs3D< ControlPointsT >::Nurbs3D(), BIAS::Nurbs1D< ControlPointsT >::SetCtrlPoint(), BIAS::Nurbs2D< ControlPointsT >::SetCtrlPoint(), and BIAS::Nurbs3D< ControlPointsT >::SetCtrlPoint().