11 #include <Base/Math/Vector2.hh>
12 #include "NurbsBase.hh"
22 template <
class ControlPo
intsT>
30 Nurbs2D(
int knotsPerDim = 4,
int degree = 2);
45 void Init(
const ControlPointsT minX,
const ControlPointsT maxX,
46 const ControlPointsT minY,
const ControlPointsT maxY);
65 inline void SetCtrlPoint(
const int &indexU,
const int &indexV,
const ControlPointsT &value){
66 BIASASSERT(indexU >= 0);
68 BIASASSERT(indexV >= 0);
77 inline ControlPointsT
GetCtrlPoint(
const int &indexU,
const int &indexV)
const{
78 BIASASSERT(indexU >= 0);
80 BIASASSERT(indexV >= 0);
102 for (
int i = 0; i < 2; i++){
double ** weights_
The corresponding weights to the function points.
void GetRelevantBaseCtrlPoints(const BIAS::Vector2< double > &nurbsParam, BIAS::Vector2< int > &begin, BIAS::Vector2< int > &end) const
for a given point in the parameter space, this functions yields for each dimension the first and the ...
int degree_
Degree of the b-splines.
void EvalCustom(const BIAS::Vector2< double > &nurbsParam, ControlPointsT &result, const ControlPointsT **controlPoints) const
Evaluate the NURBS function at a given point in the parameter space for a certain control point vecto...
ControlPointsT GetCtrlPoint(const int &indexU, const int &indexV) const
Get the value of a specific control point.
void Eval(const BIAS::Vector2< double > &nurbsParam, ControlPointsT &result) const
Evaluate the NURBS function at a given point in the parameter space.
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.
ControlPointsT ** controlPoints_
The array of control points.
This class implements a NURBS-function with a two dimensional parameter space (A NURBS surface)...
void EvalBaseFunc(const int x, const int y, const BIAS::Vector2< double > &nurbsParam, double &result, double *baseFuncCache) const
Evaluate the base function for the control point for the point nurbsParam using a dedicated cache for...
void SetCtrlPoint(const int &indexU, const int &indexV, const ControlPointsT &value)
Set the value of a specific control point.
Base class for NURBS classes.
std::vector< std::vector< double > > knotVector_
The vector of knot vectors (One for each dimension)
Nurbs2D(int knotsPerDim=4, int degree=2)
Standard Constructor.
void Init(const ControlPointsT minX, const ControlPointsT maxX, const ControlPointsT minY, const ControlPointsT maxY)
Very generic initialization function for the control points.
int numCtrlPoints_
The number of control points per dimension.
void EvalBaseFunc(const int x, const int y, const BIAS::Vector2< double > &nurbsParam, double &result) const
Evaluate the base function for the control point for the point nurbsParam.