pub struct AnimationCell {
inner: Box<dyn EvalDyn>,
rate_func: fn(f64) -> f64,
time_range: Range<f64>,
enabled: bool,
anim_name: &'static str,
entered: bool,
}Expand description
A single runtime animation node in its parent’s time coordinates.
Fields§
§inner: Box<dyn EvalDyn>§rate_func: fn(f64) -> f64§time_range: Range<f64>§enabled: bool§anim_name: &'static str§entered: boolWhether this cell’s inner state has been reset for the current run.
Implementations§
Source§impl AnimationCell
impl AnimationCell
Sourcepub fn time_range(&self) -> Range<f64>
pub fn time_range(&self) -> Range<f64>
Global or parent-relative time range, depending on its containing plan.
Sourcepub fn duration_secs(&self) -> f64
pub fn duration_secs(&self) -> f64
Duration in seconds.
fn shift_by(&mut self, offset_sec: f64)
Sourcepub fn active_at(&self, sec: f64) -> bool
pub fn active_at(&self, sec: f64) -> bool
Whether the given scene time is inside this clip’s inclusive range.
Sourcefn local_time(&self, sec: f64, prev_sec: f64) -> SegmentTime
fn local_time(&self, sec: f64, prev_sec: f64) -> SegmentTime
Compute the time context in this cell’s local coordinates.
Sourcepub(crate) fn reset_entered(&mut self)
pub(crate) fn reset_entered(&mut self)
Mark this clip as not yet entered (used by SceneEvaluator::seek).
Sourcepub(crate) fn sample_at_sec(&self, sec: f64, output: &mut Vec<DynItem>)
pub(crate) fn sample_at_sec(&self, sec: f64, output: &mut Vec<DynItem>)
Sample this clip at a scene time (pure; no tick advancement).
Sourcepub(crate) fn step_at_sec(&mut self, sec: f64, prev_sec: f64)
pub(crate) fn step_at_sec(&mut self, sec: f64, prev_sec: f64)
Advance this clip’s inner state along the logic grid.
Resets the inner state on first activation (deterministic replay), then steps it with the rate-warped local delta. Functional leaves and containers without iterative content step as no-ops.
Sourcepub fn eval_alpha_dyn_into(&self, alpha: f64, output: &mut Vec<DynItem>)
pub fn eval_alpha_dyn_into(&self, alpha: f64, output: &mut Vec<DynItem>)
Append normalized evaluation results after applying this node’s rate function.
Sourcepub fn eval_alpha_dyn(&self, alpha: f64) -> Vec<DynItem>
pub fn eval_alpha_dyn(&self, alpha: f64) -> Vec<DynItem>
Evaluate normalized progress into a flat collection of scene items.
Sourcepub fn eval_at_sec(&self, sec: f64) -> Option<Vec<DynItem>>
pub fn eval_at_sec(&self, sec: f64) -> Option<Vec<DynItem>>
Evaluate at a time contained in this clip’s inclusive range.
fn contains_sec(&self, sec: f64, parent_duration: f64) -> bool
pub(crate) fn animation_info(&self) -> AnimationInfo
Auto Trait Implementations§
impl Freeze for AnimationCell
impl !RefUnwindSafe for AnimationCell
impl !Send for AnimationCell
impl !Sync for AnimationCell
impl Unpin for AnimationCell
impl UnsafeUnpin for AnimationCell
impl !UnwindSafe for AnimationCell
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
§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>
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>
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