Struct oxygengine_animation::phase::Phase
source · pub struct Phase { /* private fields */ }
Implementations§
source§impl Phase
impl Phase
pub fn new( points: Vec<SplinePoint<(Scalar, Scalar)>> ) -> Result<Self, SplineError>
pub fn linear( value_frame: Range<Scalar>, time_frame: Range<Scalar> ) -> Result<Self, SplineError>
pub fn bezier( (x1, y1, x2, y2): (Scalar, Scalar, Scalar, Scalar), value_frame: Range<Scalar>, time_frame: Range<Scalar> ) -> Result<Self, SplineError>
pub fn ease( ease: Ease, value_frame: Range<Scalar>, time_frame: Range<Scalar> ) -> Result<Self, SplineError>
pub fn point(point: Scalar) -> Result<Self, SplineError>
pub fn time_frame(&self) -> Range<Scalar>
pub fn duration(&self) -> Scalar
pub fn points(&self) -> &[SplinePoint<(Scalar, Scalar)>]
pub fn set_points(&mut self, points: Vec<SplinePoint<(Scalar, Scalar)>>)
pub fn spline(&self) -> &Spline<(Scalar, Scalar)>
pub fn time_iter(&self, steps: usize) -> impl Iterator<Item = Scalar>
pub fn sample(&self, time: Scalar) -> Scalar
Trait Implementations§
source§impl<'de> Deserialize<'de> for Phase
impl<'de> Deserialize<'de> for Phase
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 RefUnwindSafe for Phase
impl Send for Phase
impl Sync for Phase
impl Unpin for Phase
impl UnwindSafe for Phase
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