pub struct FramePlan { /* private fields */ }Expand description
What one frame must do: the steps to execute, the steps the budget refused, and how far past the last step the renderer stands.
A Copy value that borrows nothing, so iterating its steps never
conflicts with touching the rest of the caller’s state.
Implementations§
Source§impl FramePlan
impl FramePlan
Sourcepub const fn steps(&self) -> Steps ⓘ
pub const fn steps(&self) -> Steps ⓘ
The steps to execute, in tick order — exactly
FramePlan::step_count of them.
pub const fn step_count(&self) -> u32
Sourcepub const fn dt(&self) -> Timestep
pub const fn dt(&self) -> Timestep
The timestep this plan was cut against.
Public because the digest absorbs it: anything reconstructing what was hashed — a test, a comparison lane, a tool diffing two runs — needs every field that went in, and a digested field with no accessor is one a consumer has to guess at.
Sourcepub const fn first_tick(&self) -> u64
pub const fn first_tick(&self) -> u64
The tick index of the first step, which is also the loop’s tick count before this frame.
Sourcepub const fn dropped(&self) -> u64
pub const fn dropped(&self) -> u64
Steps the budget refused: simulation time fell behind wall time by
dropped × timestep, permanently. Reported, never silently banked.
Sourcepub const fn remainder(&self) -> Nanos
pub const fn remainder(&self) -> Nanos
Elapsed time carried into the next frame; always below
FramePlan::timestep.
This and FramePlan::timestep are the exact rational a renderer
interpolates by — renew_math::Alpha::new(remainder, timestep)
turns them into a blend factor. The division deliberately does
not happen here. This crate is simulation-designated and
contains no floating-point arithmetic at all; a ratio computed in
this crate would be the single exception to that, and an exception
defended by the cost of removing it is one that becomes permanent.
A consumer that wants the exact rational never goes through a
float.