#include <BSpline.h>
Public Member Functions | |
BSpline (BasisFunction *_basisFunction, float *_controlPolygonXValues, float *_controlPolygonYValues, int _controlPolygonSize) | |
~BSpline () | |
void | rebuild (float beta) |
float | getSquaredLength () |
void | render (float alpha) |
Private Member Functions | |
void | init () |
void | computeLength () |
Private Attributes | |
BasisFunction * | basisFunction |
int | controlPolygonSize |
int | splinePoints |
float * | initialControlPolygonXValues |
float * | initialControlPolygonYValues |
float * | bundlingControlPolygonXValues |
float * | bundlingControlPolygonYValues |
float * | xValues |
float * | yValues |
float | lengthSquared |
Static Private Attributes | |
static log4cxx::LoggerPtr | logger |
BSpline::BSpline | ( | BasisFunction * | _basisFunction, | |
float * | _controlPolygonXValues, | |||
float * | _controlPolygonYValues, | |||
int | _controlPolygonSize | |||
) |
Constructs a new BSpline object
_basisFunction | Pointer to the Basis Function Set to calculate the B-Spline curve | |
_controlPolygonXValues | Array with x-Values of the initial control points | |
_controlPolygonYValues | Array with y-Values of the initial control points | |
_controlPolygonSize | Number of control points |
BSpline::~BSpline | ( | ) |
Destroys the object
void BSpline::computeLength | ( | ) | [private] |
Computes the length of the B-Spline
float BSpline::getSquaredLength | ( | ) |
Returns the squared length of the B-Spline
void BSpline::init | ( | ) | [private] |
Initializes the B-Spline by filling the arrays with the x- and y-values of the underlying spline points
void BSpline::rebuild | ( | float | beta | ) |
Rebuilds the B-Spline when the bundling strength changes
beta | the new bundling strength which modifies the initial control polygon |
void BSpline::render | ( | float | alpha | ) |
Renders the B-Spline curve
alpha | The alpha value of the spline |
BasisFunction* BSpline::basisFunction [private] |
Pointer to the Basis Function Set to calculate the B-Spline curve
float* BSpline::bundlingControlPolygonXValues [private] |
Array with X-Values of the control points with bundling strength of beta, beta inside [0, 1]
float* BSpline::bundlingControlPolygonYValues [private] |
Array with Y-Values of the control points with bundling strength of beta, beta inside [0, 1]
int BSpline::controlPolygonSize [private] |
Number of control points
float* BSpline::initialControlPolygonXValues [private] |
Array with X-Values of the control points with bundling strength of 1
float* BSpline::initialControlPolygonYValues [private] |
Array with Y-Values of the control points with bundling strength of 1
float BSpline::lengthSquared [private] |
The squared length of the B-Spline
LoggerPtr BSpline::logger [static, private] |
int BSpline::splinePoints [private] |
Number of points along the line strip to draw the B-Spline curve
float* BSpline::xValues [private] |
Array with X-Values of the spline points
float* BSpline::yValues [private] |
Array with Y-Values of the spline points