pub struct SegmentTime {
pub global_secs: f64,
pub global_delta_secs: f64,
pub start_secs: f64,
pub duration_secs: f64,
pub local_secs: f64,
pub local_delta_secs: f64,
pub alpha: f64,
pub render_frame: u64,
pub is_render_frame_boundary: bool,
}Expand description
A complete time context for one evaluation/step of an animation segment.
All time values are in seconds (_secs); alpha is normalized to [0, 1].
Deltas are only meaningful during Eval::step; during sampling they are zero.
Fields§
§global_secs: f64Global scene time t at the current logic tick (seconds).
global_delta_secs: f64Global logic step length, stable (= 1 / logic_fps).
start_secs: f64Segment start s in its parent’s coordinates (seconds).
duration_secs: f64Segment duration D (seconds).
local_secs: f64Rate-warped local time u(t) = D · r((t−s)/D) (seconds).
local_delta_secs: f64Local increment Δu for this step, varies with the rate function (seconds).
alpha: f64Normalized progress alpha = local_secs / D.
render_frame: u64Current render frame index (for frame-coupled segments).
is_render_frame_boundary: boolWhether this logic step completes a render frame (for frame-coupled segments).
Trait Implementations§
Source§impl Clone for SegmentTime
impl Clone for SegmentTime
Source§fn clone(&self) -> SegmentTime
fn clone(&self) -> SegmentTime
Returns a duplicate 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 Debug for SegmentTime
impl Debug for SegmentTime
Source§impl Default for SegmentTime
impl Default for SegmentTime
Source§fn default() -> SegmentTime
fn default() -> SegmentTime
Returns the “default value” for a type. Read more
impl Copy for SegmentTime
Auto Trait Implementations§
impl Freeze for SegmentTime
impl RefUnwindSafe for SegmentTime
impl Send for SegmentTime
impl Sync for SegmentTime
impl Unpin for SegmentTime
impl UnsafeUnpin for SegmentTime
impl UnwindSafe for SegmentTime
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> FromTemplate for T
impl<T> FromTemplate for T
§impl<T> FromWorld for Twhere
T: Default,
impl<T> FromWorld for Twhere
T: Default,
§fn from_world(_world: &mut World) -> T
fn from_world(_world: &mut World) -> T
Creates Self using default().
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more§impl<T> IntoResult<T> for T
impl<T> IntoResult<T> for T
§fn into_result(self) -> Result<T, RunSystemError>
fn into_result(self) -> Result<T, RunSystemError>
Converts this type into the system output type.
§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> Template for T
impl<T> Template for T
§fn build_template(
&self,
_context: &mut TemplateContext<'_, '_>,
) -> Result<<T as Template>::Output, BevyError>
fn build_template( &self, _context: &mut TemplateContext<'_, '_>, ) -> Result<<T as Template>::Output, BevyError>
Uses this template and the given
entity context to produce a [Template::Output].§fn clone_template(&self) -> T
fn clone_template(&self) -> T
Clones this template. See
Clone.