Namespaces | Classes | Functions

OpenTissue::spline Namespace Reference

Namespaces

namespace  detail

Classes

class  MathTypes
class  NUBSpline

Functions

template<typename knot_container , typename point_container >
void compute_chord_length_knot_vector (int const &k, point_container const &X, knot_container &U)
template<typename spline_type >
void compute_point_on_spline (typename spline_type::knot_container::value_type const &u, spline_type const &spline, typename spline_type::point_container::value_type &p)
template<typename spline_type , typename math_types >
void compute_spline_derivatives (spline_type const &s, typename spline_type::knot_container::value_type const &u, int J, typename spline_type::point_container &dQ, math_types const &)
template<typename spline_type >
void insert_knot (typename spline_type::knot_container::value_type const &u, spline_type &spline)
template<typename knot_container , typename point_container >
NUBSpline< knot_container,
point_container
make_cubic_interpolation (knot_container const &U, point_container const &X)
template<typename spline_type >
spline_type make_periodic (spline_type const &spline)

Function Documentation

template<typename knot_container , typename point_container >
void OpenTissue::spline::compute_chord_length_knot_vector ( int const &  k,
point_container const &  X,
knot_container U 
) [inline]

Compute a knot_vector using chord length parameterization. Creates a knot-vector using the chord length parameterization. Can be used as a functor when doing datapoint interpolation. The operator takes a knot-vector, datapoints and the order k.

template<typename spline_type >
void OpenTissue::spline::compute_point_on_spline ( typename spline_type::knot_container::value_type const &  u,
spline_type const &  spline,
typename spline_type::point_container::value_type &  p 
) [inline]

Compute Point on A Spline.

Parameters:
u The spline parameter value at which the point should be computed.
spline The spline from which a point should be computed.
p Upon return this argument holds the value of the point at the spline paramter value u.
template<typename spline_type , typename math_types >
void OpenTissue::spline::compute_spline_derivatives ( spline_type const &  s,
typename spline_type::knot_container::value_type const &  u,
int  J,
typename spline_type::point_container dQ,
math_types const &   
) [inline]

Computation of derivatives of a B-spline.

The method can for instance be used to retrieve velocity and acceleration information about an object moving along the spline.

Parameters:
s A reference to a B-spline.
u The parameter value at which the derivatives should be computed.
J The highest order derivative, which should be computed, should be less than the order of the spline since all other higher order derivatives is trivially known to be zero.
dQ dQ is a point_container which upon return will contain the computed derivatives for each component in a the controlpoint.
template<typename spline_type >
void OpenTissue::spline::insert_knot ( typename spline_type::knot_container::value_type const &  u,
spline_type spline 
) [inline]

Insert Knot into Spline. This function will create a new knot value in the spline and a corresponding control point. Thew new data is created such that the spline shape is unaffected by the new knot-value.

Parameters:
u The parameter value at which the new knot value should be created.
spline The spline where the new knot value should be inserted.
template<typename knot_container , typename point_container >
NUBSpline<knot_container, point_container> OpenTissue::spline::make_cubic_interpolation ( knot_container const &  U,
point_container const &  X 
) [inline]

Make Interpolating Spline of Cubic Order. Given a set of data points the interpolating B-spline is created and returned.

Parameters:
U The knot vector to be used when interpolation the data points.
X The data points the cubic B-spline must run through In other terms the key-positions of the B-spline.
template<typename spline_type >
spline_type OpenTissue::spline::make_periodic ( spline_type const &  spline  )  [inline]

Make Closed Periodic Spline. This factory function will make a closed periodic spline from a non-closed one.

Parameters:
spline The non-periodic non-closed spline
Returns:
A new spline corresponding to the non-closed one expcept that it has been turned into a closed periodic spline.