Tulip  5.7.4
Large graphs analysis and drawing
tlp::GlOpenUniformCubicBSpline Class Reference

#include <GlOpenUniformCubicBSpline.h>

Inherits AbstractGlCurve.

Public Member Functions

 GlOpenUniformCubicBSpline ()
 
 GlOpenUniformCubicBSpline (const std::vector< Coord > &controlPoints, const Color &startColor, const Color &endColor, const float startSize, const float endSize, const unsigned int nbCurvePoints=200)
 
void drawCurve (std::vector< Coord > &controlPoints, const Color &startColor, const Color &endColor, const float startSize, const float endSize, const unsigned int nbCurvePoints=200) override
 

Protected Member Functions

Coord computeCurvePointOnCPU (const std::vector< Coord > &controlPoints, float t) override
 
void computeCurvePointsOnCPU (const std::vector< Coord > &controlPoints, std::vector< Coord > &curvePoints, unsigned int nbCurvePoints) override
 
void setCurveVertexShaderRenderingSpecificParameters () override
 

Detailed Description

A class to draw open uniform cubic B-splines.

A B-spline is a convenient form for representing complicated, smooth curves. A cubic uniform B-spline is a piecewise collection of cubic Bezier curves, connected end to end. A cubic B-spline is C^2 continuous, meaning there is no discontinuities in curvature. B-splines have local control : parameters of a B-spline only affect a small part of the entire spline. A B-spline is qualified as open when it passes through its first and last control points.

Definition at line 40 of file GlOpenUniformCubicBSpline.h.

Constructor & Destructor Documentation

◆ GlOpenUniformCubicBSpline() [1/2]

tlp::GlOpenUniformCubicBSpline::GlOpenUniformCubicBSpline ( )

Constructor.

Warning
Don't use it, see other construstor

◆ GlOpenUniformCubicBSpline() [2/2]

tlp::GlOpenUniformCubicBSpline::GlOpenUniformCubicBSpline ( const std::vector< Coord > &  controlPoints,
const Color &  startColor,
const Color &  endColor,
const float  startSize,
const float  endSize,
const unsigned int  nbCurvePoints = 200 
)

GlOpenUniformCubicBSpline constructor.

Parameters
controlPointsa vector of control points (size must be greater or equal to 4)
startColorthe color at the start of the curve
endColorthe color at the end of the curve
startSizethe width at the start of the curve
endSizethe width at the end of the curve
nbCurvePointsthe number of curve points to generate