pub struct SceneEvaluator {
cells: Vec<AnimationCell>,
total_secs: f64,
time_marks: Vec<(f64, TimeMark)>,
logic_fps: f64,
clock: f64,
}Expand description
Lightweight scene evaluation session.
Fields§
§cells: Vec<AnimationCell>§total_secs: f64§time_marks: Vec<(f64, TimeMark)>§logic_fps: f64§clock: f64Implementations§
Source§impl SceneEvaluator
impl SceneEvaluator
Sourcepub fn new(scene: SealedRanimScene, logic_fps: f64) -> Self
pub fn new(scene: SealedRanimScene, logic_fps: f64) -> Self
Consume a sealed scene and create a driving session.
logic_fps is the fixed logic grid resolution (1 / logic_fps is the
integration step). The time model defaults to 120 Hz; render fps only
decides which logic states are sampled.
Sourcepub fn total_secs(&self) -> f64
pub fn total_secs(&self) -> f64
Total scene duration.
Sourcepub fn time_marks(&self) -> &[(f64, TimeMark)]
pub fn time_marks(&self) -> &[(f64, TimeMark)]
Scene time marks.
Sourcepub fn animation_infos(&self) -> Vec<AnimationInfo>
pub fn animation_infos(&self) -> Vec<AnimationInfo>
Hierarchical runtime animation information for preview tooling.
Sourcepub fn advance_to(&mut self, render_secs: f64)
pub fn advance_to(&mut self, render_secs: f64)
Advance the logic grid to the floor tick of render_secs.
This is the only entry point that performs tick advancement. Calling it
with a time earlier than the current clock is a no-op; use
seek to move backwards.
Sourcepub fn seek(&mut self, render_secs: f64)
pub fn seek(&mut self, render_secs: f64)
Reset all cells and replay to render_secs (deterministic contract).
Sourcepub fn sample_into(&self, out: &mut EvaluatedFrame)
pub fn sample_into(&self, out: &mut EvaluatedFrame)
Pure sampling of the current clock: no tick advancement.
Extracts every active cell at the floor logic tick into out with
(animation_id, part) identities matching SealedRanimScene::eval_at_sec.
Call advance_to or seek first.
Auto Trait Implementations§
impl Freeze for SceneEvaluator
impl !RefUnwindSafe for SceneEvaluator
impl !Send for SceneEvaluator
impl !Sync for SceneEvaluator
impl Unpin for SceneEvaluator
impl UnsafeUnpin for SceneEvaluator
impl !UnwindSafe for SceneEvaluator
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