|
cgv
|
Template of an abstract interface for interpolators that can be evaluated at a position t and return an interpolated value at that position. More...
#include <interpolate.h>
Public Member Functions | |
| virtual std::unique_ptr< interpolator > | clone () const =0 |
| virtual ValueT | at (ParamT t) const =0 |
| Return the interpolated value at position t. | |
| 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]. | |
Template of an abstract interface for interpolators that can be evaluated at a position t and return an interpolated value at that position.
Definition at line 545 of file interpolate.h.
|
pure virtual |
Return the interpolated value at position t.
| t | The position at which to evaluate the interpolator. Typically in the range [0,1]. |
Implemented in cgv::math::identity_interpolator< ValueT, ParamT >, cgv::math::discrete_interpolator< ValueT, ParamT >, cgv::math::uniform_linear_interpolator< ValueT, ParamT >, cgv::math::linear_interpolator< ValueT, ParamT >, cgv::math::uniform_smooth_interpolator< ValueT, ParamT >, cgv::math::smooth_interpolator< ValueT, ParamT >, cgv::math::function_ref_interpolator< ValueT, ParamT >, and cgv::media::schemes::rgb_per_channel_piecewise_interpolator< ParamT >.
Referenced by cgv::math::interpolator< ValueT, ParamT >::quantize().
|
inlinevirtual |
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.
| n | The number of samples to be evaluated. |
Reimplemented in cgv::math::uniform_linear_interpolator< ValueT, ParamT >, and cgv::math::linear_interpolator< ValueT, ParamT >.
Definition at line 563 of file interpolate.h.
References cgv::math::interpolator< ValueT, ParamT >::at().
Referenced by cgv::media::discrete_color_scheme::get_colors().