50 #include <visp/vpImagePoint.h>
55 #ifdef VISP_BUILD_DEPRECATED_FUNCTIONS
56 # include <visp/vpList.h>
58 #include <visp/vpMatrix.h>
60 #ifndef DOXYGEN_SHOULD_SKIP_THIS
71 typedef struct vpBasisFunction{
113 std::vector<vpImagePoint> controlPoints;
115 std::vector<double> knots;
119 std::vector<vpImagePoint> crossingPoints;
132 inline unsigned int get_p()
const {
return p;}
141 for (
unsigned int i = 0; i < controlPoints.size(); i++)
142 list.push_back(*(&(controlPoints[0])+i));
152 for (
unsigned int i = 0; i < knots.size(); i++)
153 list.push_back(*(&(knots[0])+i));
163 for (
unsigned int i = 0; i < crossingPoints.size(); i++)
164 list.push_back(*(&(crossingPoints[0])+i));
173 inline void set_p(
unsigned int p) {this->p = p;}
182 controlPoints.clear();
183 for(std::list<vpImagePoint>::const_iterator it = list.begin(); it!=list.end(); ++it){
184 controlPoints.push_back(*it);
195 for(std::list<double>::const_iterator it = list.begin(); it!=list.end(); ++it){
196 knots.push_back(*it);
206 crossingPoints.clear();
207 for(std::list<vpImagePoint>::const_iterator it=list.begin(); it!=list.end(); ++it){
208 crossingPoints.push_back(*it);
212 static unsigned int findSpan(
double l_u,
unsigned int l_p, std::vector<double> &l_knots);
213 unsigned int findSpan(
double u);
215 static vpBasisFunction* computeBasisFuns(
double l_u,
unsigned int l_i,
unsigned int l_p, std::vector<double> &l_knots);
216 vpBasisFunction* computeBasisFuns(
double u);
218 static vpBasisFunction** computeDersBasisFuns(
double l_u,
unsigned int l_i,
unsigned int l_p,
unsigned int l_der, std::vector<double> &l_knots);
219 vpBasisFunction** computeDersBasisFuns(
double u,
unsigned int der);
221 static vpImagePoint computeCurvePoint(
double l_u,
unsigned int l_i,
unsigned int l_p, std::vector<double> &l_knots, std::vector<vpImagePoint> &l_controlPoints);
224 static vpImagePoint* computeCurveDers(
double l_u,
unsigned int l_i,
unsigned int l_p,
unsigned int l_der, std::vector<double> &l_knots, std::vector<vpImagePoint> &l_controlPoints);
225 vpImagePoint* computeCurveDers(
double u,
unsigned int der);
227 #ifdef VISP_BUILD_DEPRECATED_FUNCTIONS
239 for (
unsigned int i = 0; i < controlPoints.size(); i++) list.
addRight(*(&(controlPoints[0])+i));
250 for (
unsigned int i = 0; i < knots.size(); i++) list.
addRight(*(&(knots[0])+i));
261 for (
unsigned int i = 0; i < crossingPoints.size(); i++) list.
addRight(*(&(crossingPoints[0])+i));
271 controlPoints.clear();
273 for (
unsigned int i = 0; i < list.
nbElements(); i++)
275 controlPoints.push_back(list.
value());
289 for (
unsigned int i = 0; i < list.
nbElements(); i++)
291 knots.push_back(list.
value());
303 crossingPoints.clear();
305 for (
unsigned int i = 0; i < list.
nbElements(); i++)
307 crossingPoints.push_back(list.
value());