pub struct Curve {
pub storage: Storage,
pub keys: Vec<Key>,
}Expand description
One scalar curve: keys in increasing time, evaluated as a cubic Hermite spline between them (a dense curve’s slopes are its secants, so it is piecewise linear).
Fields§
§storage: StorageWhich block the curve was stored in.
keys: Vec<Key>The keys, in increasing time.
Implementations§
Source§impl Curve
impl Curve
Sourcepub fn sample(&self, t: f32) -> (f32, f32, f32)
pub fn sample(&self, t: f32) -> (f32, f32, f32)
The value at t and the slopes into and out of it: a key’s own at its time, a segment’s derivative inside it,
the end values held with no slope outside. A step segment holds its key’s value. A curve without keys is 0; a
t that is NaN has the value NaN.
Sourcepub fn is_constant(&self) -> bool
pub fn is_constant(&self) -> bool
Whether the curve has a single key.
Trait Implementations§
impl StructuralPartialEq for Curve
Auto Trait Implementations§
impl Freeze for Curve
impl RefUnwindSafe for Curve
impl Send for Curve
impl Sync for Curve
impl Unpin for Curve
impl UnsafeUnpin for Curve
impl UnwindSafe for Curve
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more