cgv
Loading...
Searching...
No Matches
cgv::math::function_ref_interpolator< ValueT, ParamT > Class Template Reference
Inheritance diagram for cgv::math::function_ref_interpolator< ValueT, ParamT >:
cgv::math::interpolator< ValueT, ParamT >

Public Member Functions

 function_ref_interpolator (std::function< ValueT(ParamT)> function)
 
std::unique_ptr< interpolator< ValueT, ParamT > > clone () const override
 
ValueT at (ParamT t) const override
 Return the interpolated value at position t.
 
- Public Member Functions inherited from cgv::math::interpolator< ValueT, ParamT >
virtual std::vector< ValueT > quantize (size_t n) const
 Return a sequence of n uniformly-spaced samples from the interpolator within the parameter range [0,1].
 

Public Attributes

std::function< ValueT(ParamT)> function
 

Detailed Description

template<typename ValueT, typename ParamT = float>
class cgv::math::function_ref_interpolator< ValueT, ParamT >

Definition at line 716 of file interpolate.h.

Constructor & Destructor Documentation

◆ function_ref_interpolator()

template<typename ValueT , typename ParamT = float>
cgv::math::function_ref_interpolator< ValueT, ParamT >::function_ref_interpolator ( std::function< ValueT(ParamT)>  function)
inline

Definition at line 718 of file interpolate.h.

Member Function Documentation

◆ at()

template<typename ValueT , typename ParamT = float>
ValueT cgv::math::function_ref_interpolator< ValueT, ParamT >::at ( ParamT  t) const
inlineoverridevirtual

Return the interpolated value at position t.

Parameters
tThe position at which to evaluate the interpolator. Typically in the range [0,1].
Returns
The interpolated value.

Implements cgv::math::interpolator< ValueT, ParamT >.

Definition at line 724 of file interpolate.h.

◆ clone()

template<typename ValueT , typename ParamT = float>
std::unique_ptr< interpolator< ValueT, ParamT > > cgv::math::function_ref_interpolator< ValueT, ParamT >::clone ( ) const
inlineoverridevirtual

Implements cgv::math::interpolator< ValueT, ParamT >.

Definition at line 720 of file interpolate.h.

Member Data Documentation

◆ function

template<typename ValueT , typename ParamT = float>
std::function<ValueT(ParamT)> cgv::math::function_ref_interpolator< ValueT, ParamT >::function

Definition at line 730 of file interpolate.h.


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