pub struct Animation { /* private fields */ }Implementations§
Source§impl Animation
impl Animation
pub const DEFAULT_COLOR: [f32; 4]
pub fn new(name: impl Into<String>) -> Self
pub fn get_name(&self) -> &str
pub fn get_duration(&self) -> f32
pub fn set_duration(&mut self, duration: f32)
pub fn get_color(&self) -> [f32; 4]
pub fn get_color_mut(&mut self) -> &mut [f32; 4]
Sourcepub fn apply(
&self,
skeleton: &mut Skeleton,
last_time: f32,
time: f32,
looped: bool,
events: Option<&mut Vec<Event>>,
alpha: f32,
from: MixFrom,
add: bool,
out: bool,
applied_pose: bool,
)
pub fn apply( &self, skeleton: &mut Skeleton, last_time: f32, time: f32, looped: bool, events: Option<&mut Vec<Event>>, alpha: f32, from: MixFrom, add: bool, out: bool, applied_pose: bool, )
C++ Animation::apply(Skeleton&, float, float, bool, Array<Event*>*, float, MixFrom, bool, bool, bool).
Sourcepub fn search_with_step(frames: &[f32], target: f32, step: i32) -> i32
pub fn search_with_step(frames: &[f32], target: f32, step: i32) -> i32
C++ Animation::search(Array<float>&, float, int).
Sourcepub fn has_timeline(&self, ids: &[u64]) -> bool
pub fn has_timeline(&self, ids: &[u64]) -> bool
C++ Animation::hasTimeline(Array<PropertyId>&).
Sourcepub fn get_bones(&self) -> Vec<usize>
pub fn get_bones(&self) -> Vec<usize>
Returns the Skeleton::get_bones() indices affected by this animation.
This matches C++ Animation::getBones() for callers such as Slider constraints. The
returned indices preserve the first-seen bone timeline order.
pub fn get_timelines(&self) -> impl Iterator<Item = TimelineRef<'_>> + '_
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Animation
impl RefUnwindSafe for Animation
impl Send for Animation
impl Sync for Animation
impl Unpin for Animation
impl UnsafeUnpin for Animation
impl UnwindSafe for Animation
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