Overview     Modules     Class Hierarchy     Classes     Members  

tlp::GlOpenUniformCubicBSpline Class Reference

A class to draw open uniform cubic B-splines. More...

#include <GlOpenUniformCubicBSpline.h>

Inheritance diagram for tlp::GlOpenUniformCubicBSpline:
Collaboration diagram for tlp::GlOpenUniformCubicBSpline:

List of all members.

Public Member Functions

Protected Member Functions


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 Bézier 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.


Constructor & Destructor Documentation

tlp::GlOpenUniformCubicBSpline::GlOpenUniformCubicBSpline (  ) 
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:
controlPoints a vector of control points (size must be greater or equal to 4)
startColor the color at the start of the curve
endColor the color at the end of the curve
startSize the width at the start of the curve
endSize the width at the end of the curve
nbCurvePoints the number of curve points to generate
tlp::GlOpenUniformCubicBSpline::~GlOpenUniformCubicBSpline (  ) 

Member Function Documentation

Coord tlp::GlOpenUniformCubicBSpline::computeCurvePointOnCPU ( const std::vector< Coord > &  controlPoints,
float  t 
) [protected, virtual]

Implements tlp::AbstractGlCurve.

void tlp::GlOpenUniformCubicBSpline::computeCurvePointsOnCPU ( const std::vector< Coord > &  controlPoints,
std::vector< Coord > &  curvePoints,
unsigned int  nbCurvePoints 
) [protected, virtual]

Implements tlp::AbstractGlCurve.

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

Reimplemented from tlp::AbstractGlCurve.

void tlp::GlOpenUniformCubicBSpline::setCurveVertexShaderRenderingSpecificParameters (  )  [protected, virtual]

Reimplemented from tlp::AbstractGlCurve.



Tulip Software by LaBRI Visualization Team    2001 - 2012