|
| Spline_ (int degree, const Vector &x, const Vector_< T > &y) |
| Create a Spline_ object based on a set of control points. See SplineFitter for a nicer way to create these objects. More...
|
|
| Spline_ () |
| Default constructor creates an empty Spline_ handle; not very useful. More...
|
|
| Spline_ (const Spline_ &source) |
| Copy constructor is shallow and reference-counted; that is, the new Spline_ refers to the same object as does source. More...
|
|
Spline_ & | operator= (const Spline_ &source) |
| Copy assignment is shallow and reference-counted; that is, after the assignment this Spline_ refers to the same object as does source. More...
|
|
| ~Spline_ () |
| Destructor decrements the reference count and frees the heap space if this is the last reference. More...
|
|
T | calcValue (Real x) const |
| Calculate the values of the dependent variables at a particular value of the independent variable. More...
|
|
T | calcDerivative (int order, Real x) const |
| Calculate a derivative of the spline function with respect to its independent variable, at the given value. More...
|
|
const Vector & | getControlPointLocations () const |
| Get the locations (that is, the values of the independent variable) for each of the Bezier control points. More...
|
|
const Vector_< T > & | getControlPointValues () const |
| Get the values of the dependent variables at each of the Bezier control points. More...
|
|
int | getSplineDegree () const |
| Get the degree of the spline. More...
|
|
T | calcValue (const Vector &x) const override |
| Alternate signature provided to implement the generic Function_ interface expects a one-element Vector for the independent variable. More...
|
|
T | calcDerivative (const Array_< int > &derivComponents, const Vector &x) const override |
| Alternate signature provided to implement the generic Function_ interface expects an awkward derivComponents argument, and takes a one-element Vector for the independent variable. More...
|
|
T | calcDerivative (const std::vector< int > &derivComponents, const Vector &x) const |
| For the Function_ style interface, this provides compatibility with std::vector. More...
|
|
int | getArgumentSize () const override |
| Required by the Function_ interface. More...
|
|
int | getMaxDerivativeOrder () const override |
| Required by the Function_ interface. More...
|
|
Spline_ * | clone () const override |
| Required by the Function_ interface. More...
|
|
virtual | ~Function_ () |
|
T | calcDerivative (const std::vector< int > &derivComponents, const Vector &x) const |
| This provides compatibility with std::vector without requiring any copying. More...
|
|
template<class T>
class SimTK::Spline_< T >
This class implements a non-uniform Bezier curve.
It requires the spline degree to be odd (linear, cubic, quintic, etc.), but supports arbitrarily high degrees. Only spline curves are supported, not surfaces or higher dimensional objects, but the curve may be defined in an arbitrary dimensional space. That is, a Spline_ is a Function_ that calculates an arbitrary number of output values based on a single input value. The template argument must be either Real or Vec<N> from some integer N. The name "Spline" (with no trailing "_") may be used as a synonym for Spline_<Real>.
Most users should generate Spline_ objects using SplineFitter which can be used to generate spline curves through data points rather than requiring Bezier control points.
- See also
- SplineFitter for best-fitting a spline through sampled data.
-
BicubicSurface for fitting a smooth surface to 2D sample data.