35 #ifndef __usPolynomialCurve2D_h_
36 #define __usPolynomialCurve2D_h_
40 #include <visp3/core/vpColVector.h>
41 #include <visp3/core/vpMatrix.h>
84 void setOrder(
unsigned int order);
89 unsigned int getOrder()
const;
94 void setStartParameter(
double startParameter);
99 double getStartParameter()
const;
104 void setEndParameter(
double endParameter);
109 double getEndParameter()
const;
116 void setBoundaries(
double startParameter,
double endParamter);
121 void setParametricLength(
double length);
126 double getParametricLength()
const;
131 void setLength(
double length,
double precision = 1e-4);
136 double getLength(
int nbCountSeg = 50)
const;
141 void setPolynomialCoefficients(
const vpMatrix &polynomialCoefficients);
146 vpMatrix getPolynomialCoefficients()
const;
151 vpColVector getPoint(
double parameter)
const;
156 vpMatrix getPoints(vpColVector parameters)
const;
161 vpColVector getStartPoint()
const;
166 vpColVector getEndPoint()
const;
171 vpColVector getTangent(
double parameter)
const;
176 vpColVector getStartTangent()
const;
181 vpColVector getEndTangent()
const;
186 vpColVector getDerivative(
double parameter,
unsigned int order)
const;
196 void defineFromPoints(
const std::vector<vpColVector> &points,
const std::vector<double> ¶m,
197 unsigned int order = 0);
207 void defineFromPoints(
const vpMatrix points,
const vpColVector ¶m,
unsigned int order = 0);
217 void defineFromPointsAuto(
const std::vector<vpColVector> &points,
unsigned int order = 0);
227 void defineFromPointsAuto(
const vpMatrix &points,
unsigned int order = 0);
239 void defineFromPointsAuto(
const std::vector<vpColVector> &points,
const vpColVector &direction,
240 unsigned int order = 0);
252 void defineFromPointsAuto(
const vpMatrix &points,
const vpColVector &direction,
unsigned int order = 0);
263 void defineFromWeightedPoints(
const std::vector<vpColVector> &points,
const std::vector<double> ¶m,
264 const std::vector<double> &weights,
unsigned int order = 0);
275 void defineFromWeightedPoints(
const vpMatrix &points,
const vpColVector ¶m,
const vpColVector &weights,
276 unsigned int order = 0);
287 void defineFromWeightedPointsAuto(
const std::vector<vpColVector> &points,
const std::vector<double> &weights,
288 unsigned int order = 0);
299 void defineFromWeightedPointsAuto(
const vpMatrix &points,
const vpColVector &weights,
unsigned int order = 0);
312 void defineFromWeightedPointsAuto(
const std::vector<vpColVector> &points,
const std::vector<double> &weights,
313 const vpColVector &direction,
unsigned int order = 0);
326 void defineFromWeightedPointsAuto(
const vpMatrix &points,
const vpColVector &weights,
const vpColVector &direction,
327 unsigned int order = 0);
334 double getCurvature(
double param)
const;
341 double getMeanAxisDeviation(
int nbCountSeg = 50)
const;
349 void setControlPoints(
const vpMatrix &controlPoints);
354 void setControlPoints(
double **controlPoints);
359 vpMatrix getControlPoints()
const;
364 vpMatrix getRenderingPoints()
const;
374 usPolynomialCurve2D getSubPolynomialCurve(
double startParameter,
double endParameter)
const;
385 void changeCoefficientsToFitBoundaries(
double startParameter,
double endParameter);
395 void changeCoefficientsToFitMetricLength();
400 void move(
double x,
double y,
double tz);
405 void scale(
double s);
410 friend VISP_EXPORT std::ostream &operator<<(std::ostream &s,
const usPolynomialCurve2D &seg);
413 friend VISP_EXPORT std::ostream &operator<<=(std::ostream &s,
const usPolynomialCurve2D &seg);
vpMatrix m_polynomialCoefficients