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

#include <vgl_cubic_spline_3d.h>

Public Member Functions

 vgl_cubic_spline_3d ()
 Default constructor. More...
 
 vgl_cubic_spline_3d (std::vector< vgl_point_3d< Type > > knots, Type s=Type(0.5), bool closed=false)
 Construct from set of knots. More...
 
bool closed () const
 accessors. More...
 
Type s () const
 
unsigned n_knots () const
 
std::vector< vgl_point_3d< Type > > knots () const
 
std::vector< vgl_point_3d< Type > > const & const_knots () const
 
void set_knots (std::vector< vgl_point_3d< 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_3d< Type > &spl) const
 Equality operator. More...
 
bool operator!= (vgl_cubic_spline_3d< 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_3d< Type > operator() (Type t) const
 function value at t, where 0 <= t < n-1 and n is the number of knots. More...
 
vgl_vector_3d< Type > tangent (Type t) const
 tangent to the curve at parameter t. More...
 
vgl_plane_3d< Type > normal_plane (Type t)
 normal plane to the curve at parameter t. More...
 

Private Attributes

bool closed_curve_
 members. More...
 
Type s_
 
std::vector< vgl_point_3d< Type > > knots_
 

Detailed Description

template<class Type>
class vgl_cubic_spline_3d< Type >

Definition at line 35 of file vgl_cubic_spline_3d.h.

Constructor & Destructor Documentation

◆ vgl_cubic_spline_3d() [1/2]

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

Default constructor.

Definition at line 44 of file vgl_cubic_spline_3d.h.

◆ vgl_cubic_spline_3d() [2/2]

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

Construct from set of knots.

Definition at line 47 of file vgl_cubic_spline_3d.h.

Member Function Documentation

◆ closed()

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

accessors.

Definition at line 53 of file vgl_cubic_spline_3d.h.

◆ coefficients()

template<class Type >
void vgl_cubic_spline_3d< 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 example of their useinterpolating 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 99 of file vgl_cubic_spline_3d.h.

◆ const_knots()

template<class Type>
std::vector<vgl_point_3d<Type> > const& vgl_cubic_spline_3d< Type >::const_knots ( ) const
inline

Definition at line 58 of file vgl_cubic_spline_3d.h.

◆ knot_indices()

template<class Type >
void vgl_cubic_spline_3d< 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 108 of file vgl_cubic_spline_3d.h.

◆ knots()

template<class Type>
std::vector<vgl_point_3d<Type> > vgl_cubic_spline_3d< Type >::knots ( ) const
inline

Definition at line 57 of file vgl_cubic_spline_3d.h.

◆ max_t()

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

maximum value of the spline parameter.

Definition at line 66 of file vgl_cubic_spline_3d.h.

◆ n_knots()

template<class Type>
unsigned vgl_cubic_spline_3d< Type >::n_knots ( ) const
inline

Definition at line 55 of file vgl_cubic_spline_3d.h.

◆ normal_plane()

template<class Type>
vgl_plane_3d<Type> vgl_cubic_spline_3d< Type >::normal_plane ( Type  t)
inline

normal plane to the curve at parameter t.

Definition at line 91 of file vgl_cubic_spline_3d.h.

◆ operator!=()

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

Definition at line 71 of file vgl_cubic_spline_3d.h.

◆ operator()()

template<class Type >
vgl_point_3d< Type > vgl_cubic_spline_3d< Type >::operator() ( Type  t) const

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

Definition at line 148 of file vgl_cubic_spline_3d.h.

◆ operator==()

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

Equality operator.

Definition at line 136 of file vgl_cubic_spline_3d.h.

◆ s()

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

Definition at line 54 of file vgl_cubic_spline_3d.h.

◆ set_knots()

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

Definition at line 60 of file vgl_cubic_spline_3d.h.

◆ set_s()

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

Definition at line 62 of file vgl_cubic_spline_3d.h.

◆ tangent()

template<class Type >
vgl_vector_3d< Type > vgl_cubic_spline_3d< Type >::tangent ( Type  t) const

tangent to the curve at parameter t.

Definition at line 176 of file vgl_cubic_spline_3d.h.

Member Data Documentation

◆ closed_curve_

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

members.

Definition at line 38 of file vgl_cubic_spline_3d.h.

◆ knots_

template<class Type>
std::vector<vgl_point_3d<Type> > vgl_cubic_spline_3d< Type >::knots_
private

Definition at line 40 of file vgl_cubic_spline_3d.h.

◆ s_

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

Definition at line 39 of file vgl_cubic_spline_3d.h.


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