pub struct CompiledGraph {
pub params: Vec<ParamSpec>,
pub states: Vec<CompiledState>,
pub initial: usize,
}Expand description
A compiled animation state machine. Built once from the AnimationGraph asset;
read-only afterwards except for clip-duration refresh on hot-reload.
Fields§
§params: Vec<ParamSpec>The graph’s parameters, in index order.
states: Vec<CompiledState>The graph’s states, in index order.
initial: usizeIndex of the state the graph starts in.
Implementations§
Source§impl CompiledGraph
impl CompiledGraph
Sourcepub fn param_index(&self, name: &str) -> Option<usize>
pub fn param_index(&self, name: &str) -> Option<usize>
Index of a parameter by name, for surfaces (debug commands) that still speak names.
Sourcepub fn default_params(&self) -> Vec<f32>
pub fn default_params(&self) -> Vec<f32>
The parameter vector seeded to each parameter’s declared default.
Sourcepub fn refresh_clip_duration(&mut self, clip: usize, duration_secs: f32)
pub fn refresh_clip_duration(&mut self, clip: usize, duration_secs: f32)
Update every member playing clip to a new duration, so wrap and
exit-time math keep tracking a hot-reloaded clip.
Trait Implementations§
Source§impl Clone for CompiledGraph
impl Clone for CompiledGraph
Source§fn clone(&self) -> CompiledGraph
fn clone(&self) -> CompiledGraph
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for CompiledGraph
impl RefUnwindSafe for CompiledGraph
impl Send for CompiledGraph
impl Sync for CompiledGraph
impl Unpin for CompiledGraph
impl UnsafeUnpin for CompiledGraph
impl UnwindSafe for CompiledGraph
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