#include <Spline.h>
Public Member Functions | |
Spline () | |
~Spline () | |
void | initialize (unsigned int numCP, unsigned int lev) |
void | evaluate () |
Spline | copy (void) |
unsigned long | getLevel () |
unsigned long | getNumControlPoints () |
unsigned long | getNumSplinePoints () |
std::vector< Spline::SplinePoint > * | getControlPoints () |
std::vector< Spline::SplinePoint > * | getControlPointNormals () |
std::vector< Spline::SplinePoint > * | getSplinePoints () |
std::vector< Spline::SplinePoint > * | getSplinePointNormals () |
void | printControlPoints () |
void | printControlPointNormals () |
void | printSplinePoints () |
void | printSplinePointNormals () |
Protected Attributes | |
std::vector< SplinePoint > | _controlPoints |
std::vector< SplinePoint > | _controlPointNormalVectors |
std::vector< SplinePoint > | _splinePoints |
std::vector< SplinePoint > | _splinePointNormalVectors |
unsigned long | _level |
unsigned long | _numControlPoints |
unsigned long | _numSplinePoints |
Classes | |
struct | SplinePoint |
It is adapted from the Spline class in the original Tabletop Framework by T. Isenberg and J. Ales. The name of the functions were changed but their contents were kept. Documentation comments were added as well.
Spline::Spline | ( | ) |
Constructs an empty spline curve.
Spline::~Spline | ( | ) |
Destroys this spline curve.
void Spline::initialize | ( | unsigned int | numCP, | |
unsigned int | lev | |||
) |
Initializes the spline and sets the number of control points and level.
numCP | the number of control points in the spline. | |
lev | the number of subdivisions of the spline. |
void Spline::evaluate | ( | ) |
Evaluates this spline using the current control points. It calculates sample points along the spline and the normal vectors at these points.
Spline Spline::copy | ( | void | ) |
Copies this spline to a new object and returns it.
unsigned long Spline::getLevel | ( | ) |
Returns the number of subdivisions of this spline.
unsigned long Spline::getNumControlPoints | ( | ) |
Returns the number of control points of this spline.
unsigned long Spline::getNumSplinePoints | ( | ) |
Returns the number of sample points of this spline.
std::vector< Spline::SplinePoint > * Spline::getControlPoints | ( | ) |
Returns the control points of this spline.
std::vector< Spline::SplinePoint > * Spline::getControlPointNormals | ( | ) |
Returns the normal vectors at the control points of this spline.
std::vector< Spline::SplinePoint > * Spline::getSplinePoints | ( | ) |
Returns the sample points of this spline.
std::vector< Spline::SplinePoint > * Spline::getSplinePointNormals | ( | ) |
Returns the normal vectors at the sample points of this spline.
void Spline::printControlPoints | ( | ) |
Prints the control points of this spline.
void Spline::printControlPointNormals | ( | ) |
Prints the normal vector at the control points of this spline.
void Spline::printSplinePoints | ( | ) |
Prints the sample points of this spline.
void Spline::printSplinePointNormals | ( | ) |
Prints the normal vector at the sample points of this spline.
std::vector<SplinePoint> Spline::_controlPoints [protected] |
The spline control points.
std::vector<SplinePoint> Spline::_controlPointNormalVectors [protected] |
The normal vectors at the control points.
std::vector<SplinePoint> Spline::_splinePoints [protected] |
The sample points along the spline.
std::vector<SplinePoint> Spline::_splinePointNormalVectors [protected] |
The normal vectors at the sample points.
unsigned long Spline::_level [protected] |
The number of subdivisions of the spline.
unsigned long Spline::_numControlPoints [protected] |
The number of control points.
unsigned long Spline::_numSplinePoints [protected] |
The number of sample points.