21 #ifndef PARAMETRICCURVES_H_
22 #define PARAMETRICCURVES_H_
26 #include <tulip/tulipconf.h>
27 #include <tulip/Coord.h>
38 TLP_SCOPE Coord computeBezierPoint(
const std::vector<Coord> &controlPoints,
const float t);
46 TLP_SCOPE
void computeBezierPoints(
const std::vector<Coord> &controlPoints,
47 std::vector<Coord> &curvePoints,
48 const unsigned int nbCurvePoints = 100);
68 TLP_SCOPE Coord computeCatmullRomPoint(
const std::vector<Coord> &controlPoints,
const float t,
69 const bool closedCurve =
false,
const float alpha = 0.5);
82 TLP_SCOPE
void computeCatmullRomPoints(
const std::vector<Coord> &controlPoints,
83 std::vector<Coord> &curvePoints,
84 const bool closedCurve =
false,
85 const unsigned int nbCurvePoints = 100,
86 const float alpha = 0.5);
103 TLP_SCOPE Coord computeOpenUniformBsplinePoint(
const std::vector<Coord> &controlPoints,
104 const float t,
const unsigned int curveDegree = 3);
113 TLP_SCOPE
void computeOpenUniformBsplinePoints(
const std::vector<Coord> &controlPoints,
114 std::vector<Coord> &curvePoints,
115 const unsigned int curveDegree = 3,
116 const unsigned int nbCurvePoints = 100);