The Vish Visualization Shell 0.3
Vish
Classes | Public Member Functions | List of all members
Eagle::Interpol< Value > Class Template Reference

Interpolation of certain values. More...

#include <elementary/eagle/Interpol.hpp>

Inheritance diagram for Eagle::Interpol< Value >:

Classes

struct  Interval
 
struct  QuarticInterval
 

Public Member Functions

Interval getInterval (double t) const
 Get the interval around the value t.
 
Value & getKey (int n)
 Get the value of the nth entry, modifyable.
 
const Value & getKey (int n) const
 Get the value of the nth entry, constant.
 
int getKeyID (double t) const
 Get the number of the corresponding key frame, given an interpolation value.
 
Value operator() (double x) const
 Evaluate the function at a certain instance.
 
Value & operator[] (double x)
 Add or access an interpolation point (key).
 

Detailed Description

template<class Value>
class Eagle::Interpol< Value >

Interpolation of certain values.

Member Function Documentation

◆ getKeyID()

template<class Value >
int Eagle::Interpol< Value >::getKeyID ( double  t) const
inline

Get the number of the corresponding key frame, given an interpolation value.

Note that this function is slow, as it has to perform a linear search. Using getInterval() is faster if the absolut index is not required.