22 #ifndef GLCATMULLROMCURVE_H_
23 #define GLCATMULLROMCURVE_H_
27 #include <tulip/AbstractGlCurve.h>
44 enum ParameterizationType {UNIFORM, CHORD_LENGTH, CENTRIPETAL};
62 GlCatmullRomCurve(
const std::vector<Coord> &controlPoints,
const Color &startColor,
const Color &endColor,
63 const float startSize,
const float endSize,
const bool closedCurve =
false,
64 const unsigned int nbCurvePoints = 200,
const ParameterizationType paramType = CENTRIPETAL);
68 void setParameterizationType(
const ParameterizationType paramType) {
69 this->paramType = paramType;
72 void drawCurve(std::vector<Coord> &controlPoints,
const Color &startColor,
const Color &endColor,
const float startSize,
const float endSize,
const unsigned int nbCurvePoints=200);
74 void setClosedCurve(
const bool closedCurve) {
75 this->closedCurve = closedCurve;
80 void setCurveVertexShaderRenderingSpecificParameters();
82 Coord computeCurvePointOnCPU(
const std::vector<Coord> &controlPoints,
float t);
84 void computeCurvePointsOnCPU(
const std::vector<Coord> &controlPoints, std::vector<Coord> &curvePoints,
unsigned int nbCurvePoints);
91 ParameterizationType paramType;