21 #ifndef PARAMETRICCURVES_H_ 22 #define PARAMETRICCURVES_H_ 26 #include <tulip/tulipconf.h> 27 #include <tulip/Coord.h> 37 TLP_SCOPE
void buildPascalTriangle(
unsigned int n, std::vector<std::vector<double> > &pascalTriangle);
46 TLP_SCOPE Coord computeBezierPoint(
const std::vector<Coord> &controlPoints,
const float t);
54 TLP_SCOPE
void computeBezierPoints(
const std::vector<Coord> &controlPoints, std::vector<Coord> &curvePoints,
const unsigned int nbCurvePoints = 100);
70 TLP_SCOPE Coord computeCatmullRomPoint(
const std::vector<Coord> &controlPoints,
const float t,
const bool closedCurve =
false,
const float alpha = 0.5);
80 TLP_SCOPE
void computeCatmullRomPoints(
const std::vector<Coord> &controlPoints, std::vector<Coord> &curvePoints,
const bool closedCurve =
false,
const unsigned int nbCurvePoints = 100,
const float alpha = 0.5);
96 TLP_SCOPE Coord computeOpenUniformBsplinePoint(
const std::vector<Coord> &controlPoints,
const float t,
const unsigned int curveDegree = 3);
105 TLP_SCOPE
void computeOpenUniformBsplinePoints(
const std::vector<Coord> &controlPoints, std::vector<Coord> &curvePoints,
const unsigned int curveDegree = 3,
const unsigned int nbCurvePoints = 100);