pub trait Modifier: Send + Sync {
// Required methods
fn class_index(&self) -> u16;
fn num_targets(&self) -> usize;
fn add_target(&mut self, target: Uoid);
fn remove_target(&mut self, target: &Uoid);
fn eval(&mut self, secs: f64, del: f32, dirty: u32) -> bool;
}Expand description
Trait for all modifiers — objects that attach to scene objects and respond to messages and per-frame updates.
Corresponds to plModifier in C++.
Required Methods§
Sourcefn class_index(&self) -> u16
fn class_index(&self) -> u16
Get the class index of this modifier.
Sourcefn num_targets(&self) -> usize
fn num_targets(&self) -> usize
Get the number of targets this modifier is attached to.
Sourcefn add_target(&mut self, target: Uoid)
fn add_target(&mut self, target: Uoid)
Add a target scene object.
Sourcefn remove_target(&mut self, target: &Uoid)
fn remove_target(&mut self, target: &Uoid)
Remove a target scene object.