pub struct SceneEvaluator {
cells: Vec<AnimNode>,
total_secs: f64,
audio: Arc<[f32]>,
time_marks: Vec<(f64, TimeMark)>,
clock: f64,
}Expand description
Lightweight scene evaluation session.
Fields§
§cells: Vec<AnimNode>§total_secs: f64§audio: Arc<[f32]>§time_marks: Vec<(f64, TimeMark)>§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 retained only for call-site compatibility; it no longer
drives stepping (each iterative segment owns its sim_step).
Sourcepub fn total_secs(&self) -> f64
pub fn total_secs(&self) -> f64
Total scene duration.
Sourcepub fn audio(&self) -> &Arc<[f32]> ⓘ
pub fn audio(&self) -> &Arc<[f32]> ⓘ
The baked audio plane: interleaved stereo at the master sample rate
over [0, total_secs] (shared, cheap to clone). Empty when the scene
has no sound leaves.
Sourcepub fn mix_audio(&self, out_secs: f64, sample_rate: u32) -> Vec<f32>
pub fn mix_audio(&self, out_secs: f64, sample_rate: u32) -> Vec<f32>
The scene’s audio over [0, out_secs] as a fresh interleaved stereo
buffer.
The audio plane was already mixed once at seal
(RanimScene::seal); this is a prefix copy
of that baked buffer, zero-padded past the scene end.
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 sample_at(&mut self, render_secs: f64, out: &mut EvaluatedFrame)
pub fn sample_at(&mut self, render_secs: f64, out: &mut EvaluatedFrame)
Sample the scene at render_secs — the ONLY session interaction.
Every top-level cell evaluates itself at the target (forward/backward
direction management is internal), and the extracted items carry the
(animation_id, part) identities of SealedRanimScene::eval_at_sec.
Auto Trait Implementations§
impl !RefUnwindSafe for SceneEvaluator
impl !Send for SceneEvaluator
impl !Sync for SceneEvaluator
impl !UnwindSafe for SceneEvaluator
impl Freeze for SceneEvaluator
impl Unpin for SceneEvaluator
impl UnsafeUnpin 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> ⓘ
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§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>
§impl<F, T> IntoSample<T> for Fwhere
T: FromSample<F>,
impl<F, T> IntoSample<T> for Fwhere
T: FromSample<F>,
fn into_sample(self) -> T
§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> TransformedExt for T
impl<T> TransformedExt for T
Source§fn transformed<G>(self, transform: G) -> Transformed<Self, G>
fn transformed<G>(self, transform: G) -> Transformed<Self, G>
self wrapped with transform stored exactly as G.