Struct oxygengine_animation::animation::Animation
source · pub struct Animation<T>where
T: Default + Clone + Curved + CurvedChange,{
pub value_spline: Spline<T>,
pub time_phase: Phase,
pub playing: bool,
pub looped: bool,
/* private fields */
}
Fields§
§value_spline: Spline<T>
§time_phase: Phase
§playing: bool
§looped: bool
Implementations§
source§impl<T> Animation<T>where
T: Default + Clone + Curved + CurvedChange,
impl<T> Animation<T>where T: Default + Clone + Curved + CurvedChange,
pub fn new(value_spline: Spline<T>, time_phase: Phase) -> Self
pub fn instant(value: T) -> Self
pub fn time(&self) -> Scalar
pub fn start(&mut self)
pub fn end(&mut self)
pub fn set_time(&mut self, time: Scalar)
pub fn in_progress(&self) -> bool
pub fn is_complete(&self) -> bool
pub fn duration(&self) -> Scalar
pub fn value(&self) -> T
pub fn sample(&self, time: Scalar) -> T
pub fn process(&mut self, delta_time: Scalar)
Trait Implementations§
source§impl<'de, T> Deserialize<'de> for Animation<T>where
T: Default + Clone + Curved + CurvedChange + Serialize + DeserializeOwned,
impl<'de, T> Deserialize<'de> for Animation<T>where T: Default + Clone + Curved + CurvedChange + Serialize + DeserializeOwned,
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl<T> RefUnwindSafe for Animation<T>where T: RefUnwindSafe,
impl<T> Send for Animation<T>where T: Send,
impl<T> Sync for Animation<T>where T: Sync,
impl<T> Unpin for Animation<T>where T: Unpin,
impl<T> UnwindSafe for Animation<T>where T: UnwindSafe,
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<T> Initialize for Twhere
T: Default,
impl<T> Initialize for Twhere T: Default,
fn initialize(&mut self)
§unsafe fn initialize_raw(data: *mut ())
unsafe fn initialize_raw(data: *mut ())
Safety Read more