pub struct TimeCurve<'a> {
pub keys: &'a [TimeKeyframe],
pub before: Extrapolation,
pub after: Extrapolation,
}Expand description
The keyframes of a TimeMap::Curve and what it does outside them.
Fields§
§keys: &'a [TimeKeyframe]Its keyframes, ascending in time.
before: ExtrapolationWhat it does before the first keyframe.
after: ExtrapolationWhat it does from the last keyframe on.
Implementations§
Source§impl<'a> TimeCurve<'a>
impl<'a> TimeCurve<'a>
Sourcepub fn shown(&self, tick: i64) -> Option<i64>
pub fn shown(&self, tick: i64) -> Option<i64>
The source tick the curve names at timeline tick, before any clamp to a source range.
None when it does not fit in ticks.
Sourcepub fn hull(&self, piece: &TimePiece, from: f64, to: f64) -> (f64, f64)
pub fn hull(&self, piece: &TimePiece, from: f64, to: f64) -> (f64, f64)
The least and greatest source time the curve names over timeline times from..=to
inside piece, neither rounded.
Sourcepub fn piece(&self, tick: i64, source: TimeRange) -> TimePiece
pub fn piece(&self, tick: i64, source: TimeRange) -> TimePiece
The piece of the curve that timeline tick falls on, for reading sound along it:
one key segment on one pass, cut where a line leaves source.
Sourcepub fn position(&self, time: f64) -> (f64, f64)
pub fn position(&self, time: f64) -> (f64, f64)
The source time the curve names at timeline time time, both in ticks and neither
rounded, with the speed there in source ticks per timeline tick.
At a keyframe the value is the keyframe’s and the speed that of the segment after it;
inside a steps segment the value is the step’s and the speed zero.