Struct oxygengine_animation::transition::Transition
source · pub struct Transition<T> {
pub phase: Phase,
pub playing: bool,
/* private fields */
}
Fields§
§phase: Phase
§playing: bool
Implementations§
source§impl<T> Transition<T>where
T: Clone,
impl<T> Transition<T>where T: Clone,
pub fn new(from: T, to: T, 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 from(&self) -> &T
pub fn from_mut(&mut self) -> &mut T
pub fn to(&self) -> &T
pub fn to_mut(&mut self) -> &mut T
pub fn time_frame(&self) -> Range<Scalar>
pub fn duration(&self) -> Scalar
pub fn phase(&self) -> Scalar
pub fn sample(&self, time: Scalar) -> Scalar
pub fn set(&mut self, value: T)
pub fn process(&mut self, delta_time: Scalar)
Trait Implementations§
source§impl<T: Clone> Clone for Transition<T>
impl<T: Clone> Clone for Transition<T>
source§fn clone(&self) -> Transition<T>
fn clone(&self) -> Transition<T>
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl<T: Debug> Debug for Transition<T>
impl<T: Debug> Debug for Transition<T>
source§impl<T: Default> Default for Transition<T>
impl<T: Default> Default for Transition<T>
source§fn default() -> Transition<T>
fn default() -> Transition<T>
Returns the “default value” for a type. Read more
source§impl<'de, T> Deserialize<'de> for Transition<T>where
T: Deserialize<'de>,
impl<'de, T> Deserialize<'de> for Transition<T>where T: Deserialize<'de>,
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 Transition<T>where T: RefUnwindSafe,
impl<T> Send for Transition<T>where T: Send,
impl<T> Sync for Transition<T>where T: Sync,
impl<T> Unpin for Transition<T>where T: Unpin,
impl<T> UnwindSafe for Transition<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