pub struct ShapeInstanceSlots { /* private fields */ }Expand description
The resolved register index of each field, or None for one the
program never mentions. Built once at load.
Implementations§
Source§impl ShapeInstanceSlots
impl ShapeInstanceSlots
Sourcepub fn resolve(index: &impl Fn(&str) -> Option<u16>) -> Self
pub fn resolve(index: &impl Fn(&str) -> Option<u16>) -> Self
Resolve every field against a roster.
Sourcepub fn seed(&self, state: &mut VmState)
pub fn seed(&self, state: &mut VmState)
Seed every field’s register with MilkDrop’s default, before the program runs.
Sourcepub fn read(&self, state: &VmState) -> ShapeInstance
pub fn read(&self, state: &VmState) -> ShapeInstance
Read every field back, converting the rates.
Both arms convert. A default is stated in the reference’s
vocabulary exactly as a program’s own value is — Default is
MilkDrop’s per-frame number, not this engine’s per-second one — so
an unnamed output that skipped convert would leave a per-frame
factor in a field whose doc says “per second”. That was
design-backlog 0121, and it silently ran an entire Plan 0109
experiment at 0.98/s instead of 0.5455/s.
Trait Implementations§
Source§impl Clone for ShapeInstanceSlots
impl Clone for ShapeInstanceSlots
Source§fn clone(&self) -> ShapeInstanceSlots
fn clone(&self) -> ShapeInstanceSlots
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 moreSource§impl Debug for ShapeInstanceSlots
impl Debug for ShapeInstanceSlots
Source§impl Default for ShapeInstanceSlots
impl Default for ShapeInstanceSlots
Source§fn default() -> ShapeInstanceSlots
fn default() -> ShapeInstanceSlots
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for ShapeInstanceSlots
impl RefUnwindSafe for ShapeInstanceSlots
impl Send for ShapeInstanceSlots
impl Sync for ShapeInstanceSlots
impl Unpin for ShapeInstanceSlots
impl UnsafeUnpin for ShapeInstanceSlots
impl UnwindSafe for ShapeInstanceSlots
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