Skip to main content

TimeCurve

Struct TimeCurve 

Source
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: Extrapolation

What it does before the first keyframe.

§after: Extrapolation

What it does from the last keyframe on.

Implementations§

Source§

impl<'a> TimeCurve<'a>

Source

pub fn of(map: &'a TimeMap) -> Option<Self>

The curve of map, if it is one with keyframes.

Source

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.

Source

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.

Source

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.

Source

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.

Trait Implementations§

Source§

impl<'a> Clone for TimeCurve<'a>

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<'a> Copy for TimeCurve<'a>

Source§

impl<'a> Debug for TimeCurve<'a>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<'a> Forget for TimeCurve<'a>

§

impl<'a> Freeze for TimeCurve<'a>
where &'a [TimeKeyframe]: Freeze,

§

impl<'a> Move for TimeCurve<'a>

§

impl<'a> RefUnwindSafe for TimeCurve<'a>

§

impl<'a> Send for TimeCurve<'a>
where &'a [TimeKeyframe]: Send,

§

impl<'a> Sync for TimeCurve<'a>
where RawVecInner: Sync,

§

impl<'a> Unpin for TimeCurve<'a>
where &'a [TimeKeyframe]: Unpin,

§

impl<'a> UnsafeUnpin for TimeCurve<'a>

§

impl<'a> UnwindSafe for TimeCurve<'a>
where &'a [TimeKeyframe]: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.