|
| BSpline (void) |
|
void | add_knot (T const &t) |
| Adds a knot to the knot vector.
|
|
void | add_point (V const &p) |
| Adds a point to the control point vector.
|
|
bool | empty (void) const |
| Returns whether there are no points in this spline.
|
|
V | evaluate (T const &t) const |
| Evalutes the B-Spline.
|
|
int | get_degree (void) const |
| Returns the degree of the spline segments.
|
|
KnotVector const & | get_knots (void) const |
| Returns the knot vector.
|
|
PointVector const & | get_points (void) const |
| Returns the point vector.
|
|
void | reserve (std::size_t n_points) |
| Reserves space for points and the knot vector.
|
|
void | scale_knots (T const &min, T const &max) |
| Scales the knots such that evaluation is valid in [min, max].
|
|
void | set_degree (int degree) |
| Sets the degree of spline segments.
|
|
void | transform (math::Matrix4f const &transf) |
| Transforms the B-Spline.
|
|
void | uniform_knots (T const &min, T const &max) |
| Initializes the knot vector to be uniform.
|
|
template<class V, class T = float>
class math::BSpline< V, T >
Implementation of non-uniform B-Spline curves according to.
http://en.wikipedia.org/wiki/B-spline
A B-Spline of degree n is defined by at least n+1 control points. Let p be the number of control points, the spline is composed of p-n segments. The knot vector contains m = p+n+1 real values and defines the length of the segments with respect to t. The first and last n values in the knot vector are "extra knots" that specify Bezier end conditions. The remaining p-n+1 knot values define the segment lengths.
The spline is evaluated in a simple manner using the de Boor algorithm. The current implementation is inefficient for large p.
Definition at line 36 of file bspline.h.