- GetValue() calculates the value at the given position now ondemand,
without caching values as previously. First, it uses binary search
to find the segment (start and end point) containing the given
position. Constant and linear interpolation are straightforward,
bezier curves are calculating by binary search between the end
points until a point on the curve is found with a X coordinate close
enough to the given position. That points Y coordinate is returned.
- IsIncreasing(), GetRepeatFraction(), GetDelta() use GetValue()
instead of accessing the (removed) Values vector.
- Removed now unused private functions, and the unused public
Process().
First test results show good performance improvements for the
"rendering case" (setting up the keyframe points at once, then getting
all values) and drastic performance improvements for the "preview
case" (changing keyframe points, mixed with getting values).