Interpolant
Base class for all interpolant types.
This is the base class for all interpolation methods used in keyframe tracks. Each interpolant type provides a different method for calculating values between keyframes.
Methods
Interpolant(const vector<f32>& parameterPositions, const vector<f32>& sampleValues, u32 sampleSize, vector<f32>* resultBuffer)
Constructor for base interpolant
| parameterPositions | Array of parameter positions (times) | |
| sampleValues | Array of sample values | |
| sampleSize | Size of each sample | |
| resultBuffer | Optional result buffer | nullptr |
virtual f32 evaluate(f32 t) const
Evaluates the interpolant at parameter t
| t | Parameter value to evaluate |
void copySampleValue(u32 index) const
Copies a sample value to the result buffer
| index | Index of the sample to copy |
void copySampleValue(u32 index, f32 weight) const
Copies a weighted sample value to the result buffer
| index | Index of the sample to copy | |
| weight | Weight factor |
u32 getSettings_lhs(f32 t, u32 pos, f32& t0, f32& t1) const
Gets settings for left-hand side interpolation
| t | Parameter value | |
| pos | Position index | |
| t0 | First time value | |
| t1 | Second time value |
u32 getSettings_rhs(f32 t, u32 pos, f32& t0, f32& t1) const
Gets settings for right-hand side interpolation
| t | Parameter value | |
| pos | Position index | |
| t0 | First time value | |
| t1 | Second time value |
Properties
| parameterPositions | vector |
Array of parameter positions |
| sampleValues | vector |
Array of sample values |
| sampleSize | u32 | Size of each sample |
| resultBuffer | vector |
Result buffer |
| resultBufferInternal | vector |
Internal result buffer |