Public Member Functions | Private Attributes | List of all members
vgl_cubic_spline_2d< Type > Class Template Reference

#include <vgl_cubic_spline_2d.h>

Public Member Functions

 vgl_cubic_spline_2d ()
 Default constructor - does not initialise!. More...
 
 vgl_cubic_spline_2d (std::vector< vgl_point_2d< Type > > knots, Type s=Type(0.5), bool closed=false)
 Construct from set of knots. More...
 
bool closed () const
 accessors. More...
 
Type s () const
 
std::vector< vgl_point_2d< Type > > knots () const
 
void set_knots (std::vector< vgl_point_2d< Type > > const &knots, bool closed)
 
void set_s (Type s)
 
Type max_t () const
 maximum value of the spline parameter. More...
 
bool operator== (const vgl_cubic_spline_2d< Type > &spl) const
 Equality operator. More...
 
bool operator!= (vgl_cubic_spline_2d< Type >const &spl) const
 
void coefficients (Type vm1, Type v0, Type v1, Type v2, Type &a0, Type &a1, Type &a2, Type &a3) const
 The next two accessors are useful for interpolating other quantities than position with the same spatial spline, e.g. a vector field. More...
 
void knot_indices (Type t, unsigned &im1, unsigned &i0, unsigned &i1, unsigned &i2, Type &u) const
 the indices for the knots bounding the interval containing t, u is the local parameter in the interval 0 -> 1. More...
 
vgl_point_2d< Type > operator() (Type t) const
 function value at t, where 0 <= t <= n-1 and n is the number of knots. More...
 
vgl_vector_2d< Type > tangent (Type t) const
 

Private Attributes

bool closed_curve_
 
Type s_
 
std::vector< vgl_point_2d< Type > > knots_
 

Detailed Description

template<class Type>
class vgl_cubic_spline_2d< Type >

Definition at line 33 of file vgl_cubic_spline_2d.h.

Constructor & Destructor Documentation

◆ vgl_cubic_spline_2d() [1/2]

template<class Type>
vgl_cubic_spline_2d< Type >::vgl_cubic_spline_2d ( )
inline

Default constructor - does not initialise!.

Definition at line 40 of file vgl_cubic_spline_2d.h.

◆ vgl_cubic_spline_2d() [2/2]

template<class Type>
vgl_cubic_spline_2d< Type >::vgl_cubic_spline_2d ( std::vector< vgl_point_2d< Type > >  knots,
Type  s = Type(0.5),
bool  closed = false 
)
inline

Construct from set of knots.

Definition at line 43 of file vgl_cubic_spline_2d.h.

Member Function Documentation

◆ closed()

template<class Type>
bool vgl_cubic_spline_2d< Type >::closed ( ) const
inline

accessors.

Definition at line 49 of file vgl_cubic_spline_2d.h.

◆ coefficients()

template<class Type >
void vgl_cubic_spline_2d< Type >::coefficients ( Type  vm1,
Type  v0,
Type  v1,
Type  v2,
Type &  a0,
Type &  a1,
Type &  a2,
Type &  a3 
) const

The next two accessors are useful for interpolating other quantities than position with the same spatial spline, e.g. a vector field.

see the implementation of the () operator as an exampleinterpolating function (Catmull-Rom). V is the value to be interpolated, specified at four points. A is the resulting set of cubic coefficients, i.e., v(t) = a3 t^3 + a2 t^2 + a1 t + a0. the interval being interpolated is from v0 to v1interpolating function (Catmull-Rom). V is the value to be interpolated, specified at four points. A is the resulting set of cubic coefficients, i.e., v(t) = a3 t^3 + a2 t^2 + a1 t + a0. the interval being interpolated is from v0 to v1

Definition at line 89 of file vgl_cubic_spline_2d.h.

◆ knot_indices()

template<class Type >
void vgl_cubic_spline_2d< Type >::knot_indices ( Type  t,
unsigned &  im1,
unsigned &  i0,
unsigned &  i1,
unsigned &  i2,
Type &  u 
) const

the indices for the knots bounding the interval containing t, u is the local parameter in the interval 0 -> 1.

Definition at line 98 of file vgl_cubic_spline_2d.h.

◆ knots()

template<class Type>
std::vector<vgl_point_2d<Type> > vgl_cubic_spline_2d< Type >::knots ( ) const
inline

Definition at line 51 of file vgl_cubic_spline_2d.h.

◆ max_t()

template<class Type>
Type vgl_cubic_spline_2d< Type >::max_t ( ) const
inline

maximum value of the spline parameter.

Definition at line 58 of file vgl_cubic_spline_2d.h.

◆ operator!=()

template<class Type>
bool vgl_cubic_spline_2d< Type >::operator!= ( vgl_cubic_spline_2d< Type >const &  spl) const
inline

Definition at line 63 of file vgl_cubic_spline_2d.h.

◆ operator()()

template<class Type >
vgl_point_2d< Type > vgl_cubic_spline_2d< Type >::operator() ( Type  t) const

function value at t, where 0 <= t <= n-1 and n is the number of knots.

Definition at line 139 of file vgl_cubic_spline_2d.h.

◆ operator==()

template<class Type >
bool vgl_cubic_spline_2d< Type >::operator== ( const vgl_cubic_spline_2d< Type > &  spl) const

Equality operator.

Definition at line 126 of file vgl_cubic_spline_2d.h.

◆ s()

template<class Type>
Type vgl_cubic_spline_2d< Type >::s ( ) const
inline

Definition at line 50 of file vgl_cubic_spline_2d.h.

◆ set_knots()

template<class Type>
void vgl_cubic_spline_2d< Type >::set_knots ( std::vector< vgl_point_2d< Type > > const &  knots,
bool  closed 
)
inline

Definition at line 53 of file vgl_cubic_spline_2d.h.

◆ set_s()

template<class Type>
void vgl_cubic_spline_2d< Type >::set_s ( Type  s)
inline

Definition at line 55 of file vgl_cubic_spline_2d.h.

◆ tangent()

template<class Type >
vgl_vector_2d< Type > vgl_cubic_spline_2d< Type >::tangent ( Type  t) const

Definition at line 163 of file vgl_cubic_spline_2d.h.

Member Data Documentation

◆ closed_curve_

template<class Type>
bool vgl_cubic_spline_2d< Type >::closed_curve_
private

Definition at line 35 of file vgl_cubic_spline_2d.h.

◆ knots_

template<class Type>
std::vector<vgl_point_2d<Type> > vgl_cubic_spline_2d< Type >::knots_
private

Definition at line 37 of file vgl_cubic_spline_2d.h.

◆ s_

template<class Type>
Type vgl_cubic_spline_2d< Type >::s_
private

Definition at line 36 of file vgl_cubic_spline_2d.h.


The documentation for this class was generated from the following file: