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