47 #include <visp3/core/vpImagePoint.h>
51 #include <visp3/core/vpMatrix.h>
53 #ifndef DOXYGEN_SHOULD_SKIP_THIS
65 typedef struct vpBasisFunction {
114 std::vector<vpImagePoint> controlPoints;
116 std::vector<double> knots;
120 std::vector<vpImagePoint> crossingPoints;
132 inline unsigned int get_p()
const {
return p; }
140 inline void get_controlPoints(std::list<vpImagePoint> &list)
const
143 for (
unsigned int i = 0; i < controlPoints.size(); i++) {
144 list.push_back(*(&(controlPoints[0]) + i));
153 inline void get_knots(std::list<double> &list)
const
156 for (
unsigned int i = 0; i < knots.size(); i++) {
157 list.push_back(*(&(knots[0]) + i));
167 inline void get_crossingPoints(std::list<vpImagePoint> &list)
const
170 for (
unsigned int i = 0; i < crossingPoints.size(); i++) {
171 list.push_back(*(&(crossingPoints[0]) + i));
180 inline void set_p(
unsigned int degree) { this->p = degree; }
187 inline void set_controlPoints(
const std::list<vpImagePoint> &list)
189 controlPoints.clear();
190 for (std::list<vpImagePoint>::const_iterator it = list.begin(); it != list.end(); ++it) {
191 controlPoints.push_back(*it);
200 inline void set_knots(
const std::list<double> &list)
203 for (std::list<double>::const_iterator it = list.begin(); it != list.end(); ++it) {
204 knots.push_back(*it);
214 inline void set_crossingPoints(
const std::list<vpImagePoint> &list)
216 crossingPoints.clear();
217 for (std::list<vpImagePoint>::const_iterator it = list.begin(); it != list.end(); ++it) {
218 crossingPoints.push_back(*it);
222 static unsigned int findSpan(
double l_u,
unsigned int l_p, std::vector<double> &l_knots);
223 unsigned int findSpan(
double u);
225 static vpBasisFunction *computeBasisFuns(
double l_u,
unsigned int l_i,
unsigned int l_p,
226 std::vector<double> &l_knots);
227 vpBasisFunction *computeBasisFuns(
double u);
229 static vpBasisFunction **computeDersBasisFuns(
double l_u,
unsigned int l_i,
unsigned int l_p,
unsigned int l_der,
230 std::vector<double> &l_knots);
231 vpBasisFunction **computeDersBasisFuns(
double u,
unsigned int der);
233 static vpImagePoint computeCurvePoint(
double l_u,
unsigned int l_i,
unsigned int l_p, std::vector<double> &l_knots,
234 std::vector<vpImagePoint> &l_controlPoints);
237 static vpImagePoint *computeCurveDers(
double l_u,
unsigned int l_i,
unsigned int l_p,
unsigned int l_der,
238 std::vector<double> &l_knots, std::vector<vpImagePoint> &l_controlPoints);
239 vpImagePoint *computeCurveDers(
double u,
unsigned int der);