KJB
|
#include <m2_spline.h>
Public Member Functions | |
Nurbs_curve () | |
Nurbs_curve (uint num_knots, const float *knots, uint degree, const std::vector< Vector > &ctl_points) | |
Nurbs_curve (const Nurbs_curve &src) | |
virtual | ~Nurbs_curve () |
void | insert_at (int index, const Vector &control_point) |
virtual Nurbs_curve & | operator= (const Nurbs_curve &src) |
virtual Nurbs_curve * | clone () const |
Processes an Option from program command-line arguments. More... | |
kjb::Vector | evaluate (double u) const |
kjb::Vector | gradient (double u) const |
bool | has_zero_length () const |
![]() | |
virtual | ~Cloneable () |
Deletes this Cloneable. More... | |
Protected Attributes | |
uint | _order |
uint | _num_knots |
float * | _knots |
std::vector< Vector > | _ctl_points |
Non-rational B-spline class.
kjb::Nurbs_curve::Nurbs_curve | ( | ) |
kjb::Nurbs_curve::Nurbs_curve | ( | uint | num_knots, |
const float * | knots, | ||
uint | degree, | ||
const std::vector< Vector > & | ctl_points | ||
) |
kjb::Nurbs_curve::Nurbs_curve | ( | const Nurbs_curve & | src | ) |
|
virtual |
|
virtual |
Processes an Option from program command-line arguments.
Implements kjb::Cloneable.
|
virtual |
Evaluate the curve at some point along its length.
u | The position along the curve the evaluate. Valid values are in [0.1]. |
TODO: test non-uniform weights case
Implements kjb::Spline_curve.
|
virtual |
Evaluate the curve at some point along its length.
u | The position along the curve the evaluate. Valid values are in [0.1]. |
Implements kjb::Spline_curve.
bool kjb::Nurbs_curve::has_zero_length | ( | ) | const |
Returns true if the curve has zero length, i.e. all control points are identical. Utility method, used in gradient_*() method of Nurbs_surface
void kjb::Nurbs_curve::insert_at | ( | int | index, |
const Vector & | control_point | ||
) |
|
virtual |
|
protected |
|
protected |
|
protected |
|
protected |