cgv
Loading...
Searching...
No Matches
cgv::math::linear_interpolator< ValueT, ParamT > Class Template Reference
Inheritance diagram for cgv::math::linear_interpolator< ValueT, ParamT >:
cgv::math::piecewise_interpolator< ValueT, float > cgv::math::piecewise_interpolator_storage< std::pair< float, ValueT >, ValueT, float > cgv::math::interpolator< ValueT, float >

Public Member Functions

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

Additional Inherited Members

Public Types inherited from cgv::math::piecewise_interpolator_storage< std::pair< float, ValueT >, ValueT, float >
using point_type
Public Attributes inherited from cgv::math::piecewise_interpolator_storage< std::pair< float, ValueT >, ValueT, float >
std::vector< point_type > points

Detailed Description

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

Definition at line 664 of file interpolate.h.

Member Function Documentation

◆ at()

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

Definition at line 674 of file interpolate.h.

◆ clone()

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

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

Definition at line 670 of file interpolate.h.

◆ quantize()

template<typename ValueT, typename ParamT = float>
std::vector< ValueT > cgv::math::linear_interpolator< ValueT, ParamT >::quantize ( size_t n) const
inlineoverridevirtual

Return a sequence of n uniformly-spaced samples from the interpolator within the parameter range [0,1].

The first sample is always located at t = 0 and the last sample is always located at t = 1. A derived class might override this function in order to provide a more efficient implementation.

Parameters
nThe number of samples to be evaluated.
Returns
The sequence of values.

Reimplemented from cgv::math::interpolator< ValueT, float >.

Definition at line 678 of file interpolate.h.


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