pub struct FramePlan { /* private fields */ }Expand description
Work scheduled for one rendered frame.
Implementations§
Source§impl FramePlan
impl FramePlan
Sourcepub const fn frame_delta(self) -> Duration
pub const fn frame_delta(self) -> Duration
Returns the clamped variable-rate frame delta.
Sourcepub const fn fixed_step(self) -> Duration
pub const fn fixed_step(self) -> Duration
Returns the duration to use for every fixed simulation update.
Sourcepub const fn fixed_steps(self) -> u32
pub const fn fixed_steps(self) -> u32
Returns how many fixed simulation updates should run before rendering.
Sourcepub const fn interpolation(self) -> f64
pub const fn interpolation(self) -> f64
Returns the fractional position between the previous and current simulation states.
After running Self::fixed_steps updates, render state as
previous.lerp(current, interpolation) to remain smooth at arbitrary presentation rates.
Sourcepub const fn dropped_time(self) -> Duration
pub const fn dropped_time(self) -> Duration
Returns wall-clock time discarded by frame clamping or the catch-up step limit.
Trait Implementations§
impl Copy for FramePlan
impl StructuralPartialEq for FramePlan
Auto Trait Implementations§
impl Freeze for FramePlan
impl RefUnwindSafe for FramePlan
impl Send for FramePlan
impl Sync for FramePlan
impl Unpin for FramePlan
impl UnsafeUnpin for FramePlan
impl UnwindSafe for FramePlan
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