pub struct AnimTrack {
pub id: TrackId,
pub target: TrackTarget,
pub label: String,
pub visible: bool,
pub locked: bool,
pub muted: bool,
pub color: Vec4,
pub default_interp: CurveInterp,
/* private fields */
}Expand description
A single animated property track.
Fields§
§id: TrackId§target: TrackTarget§label: String§visible: bool§locked: bool§muted: bool§color: Vec4§default_interp: CurveInterpImplementations§
Source§impl AnimTrack
impl AnimTrack
pub fn new(id: TrackId, target: TrackTarget) -> Self
pub fn insert_key(&mut self, time: Time, value: TrackValue) -> KeyId
pub fn remove_key(&mut self, id: KeyId) -> Option<Keyframe>
pub fn remove_at_time(&mut self, time: Time)
pub fn keys(&self) -> &[Keyframe]
pub fn key_count(&self) -> usize
pub fn start_time(&self) -> Time
pub fn end_time(&self) -> Time
pub fn duration(&self) -> Time
Sourcepub fn sample(&self, t: Time) -> Option<TrackValue>
pub fn sample(&self, t: Time) -> Option<TrackValue>
Sample the track at time t. Returns None if no keys.
Sourcepub fn key_before(&self, t: Time) -> Option<&Keyframe>
pub fn key_before(&self, t: Time) -> Option<&Keyframe>
Get the key immediately before or at t.
pub fn set_key_value(&mut self, id: KeyId, value: TrackValue)
pub fn set_key_interp(&mut self, id: KeyId, interp: CurveInterp)
Trait Implementations§
Auto Trait Implementations§
impl Freeze for AnimTrack
impl RefUnwindSafe for AnimTrack
impl Send for AnimTrack
impl Sync for AnimTrack
impl Unpin for AnimTrack
impl UnsafeUnpin for AnimTrack
impl UnwindSafe for AnimTrack
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.