pub struct AnimNode {
pub(super) content: NodeContent,
pub(super) internal_time_secs: f64,
pub(super) rate_func: Option<fn(f64) -> f64>,
pub(super) time_range: Range<f64>,
pub(super) enabled: bool,
pub(super) anim_name: &'static str,
}Expand description
A single runtime animation node: one closed NodeContent plus everything
every kind shares — the subtree, the content axis, and the timing shell
(window, rate, enable) in this node’s parent’s coordinates.
Fields§
§content: NodeContent§internal_time_secs: f64Length of this node’s content time axis, in seconds: the sequence
cursor or stack extent for containers, a sound’s play window, 1.0
for bare visual leaves, 0.0 for statics.
rate_func: Option<fn(f64) -> f64>§time_range: Range<f64>§enabled: bool§anim_name: &'static strImplementations§
Source§impl AnimNode
impl AnimNode
Sourcepub(crate) fn children(&self) -> &[AnimNode]
pub(crate) fn children(&self) -> &[AnimNode]
This node’s children — only the container kinds have any; leaves
read as the empty slice, so traversals stay uniform without storing
an impossible empty Vec per leaf.
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.
pub(super) 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_alpha(&self, sec: f64) -> f64
fn local_alpha(&self, sec: f64) -> f64
Compute the rate-warped progress in this cell’s local coordinates.
The cell owns the time configuration (start, duration, rate function)
and turns it into a reading; evaluators never see the configuration
itself. A zero-duration cell reports alpha == 1.0.
Sourcepub(crate) fn eval_at(&self, sec: f64, output: &mut Vec<DynItem>)
pub(crate) fn eval_at(&self, sec: f64, output: &mut Vec<DynItem>)
Evaluate this node at a time point — the ONLY time-management entry.
Remaps the scene time to this node’s local alpha (via its rate
function), then evaluates the content at that progress (a pure query
on &self). Direction management (forward vs backward reset+replay,
how many sim_steps to integrate) is INTERNAL to each stateful node.
Audio nodes evaluate to nothing here: their content resolves through
the seal-time audio bake (bake_audio) instead of the frame
pipeline.
Sourcepub(crate) fn bake_into<'a>(
&'a self,
span: (f64, f64),
aff: Option<MixAff>,
path: &mut Vec<&'a Self>,
warp_paths: &mut Vec<Vec<&'a Self>>,
pcm: &mut [f32],
sample_rate: f64,
)
pub(crate) fn bake_into<'a>( &'a self, span: (f64, f64), aff: Option<MixAff>, path: &mut Vec<&'a Self>, warp_paths: &mut Vec<Vec<&'a Self>>, pcm: &mut [f32], sample_rate: f64, )
Bake this subtree’s audio into pcm (the whole timeline’s interleaved
stereo buffer, absolute frame indices), collecting what cannot be
pre-mixed.
The descent composes the affine global→content map (aff) while
every rate along the path is linear; a linear sound leaf then knows
its exact audible frame range and mixes it in one tight loop
(AudioTrack::mix_span_into). A leaf behind any non-linear rate has
no such map — its root-to-leaf path is pushed to warp_paths for the
residual pass instead. The tree is never mutated.
Sourcepub(crate) fn has_audio(&self) -> bool
pub(crate) fn has_audio(&self) -> bool
Whether any sound leaf lives in this subtree (enabled or not).
pub(super) fn contains_sec(&self, sec: f64, parent_duration: f64) -> bool
pub(crate) fn animation_info(&self) -> AnimationInfo
Auto Trait Implementations§
impl !RefUnwindSafe for AnimNode
impl !Send for AnimNode
impl !Sync for AnimNode
impl !UnwindSafe for AnimNode
impl Freeze for AnimNode
impl Unpin for AnimNode
impl UnsafeUnpin for AnimNode
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.