Struct BlendSpace1D
pub struct BlendSpace1D<const MAX_POINTS: usize = 8> {
pub points: [BlendPoint1D; MAX_POINTS],
pub count: usize,
}Expand description
Fixed-capacity 1D animation blend space (MAX_POINTS default 8).
Fields§
§points: [BlendPoint1D; MAX_POINTS]§count: usizeImplementations§
§impl<const MAX_POINTS: usize> BlendSpace1D<MAX_POINTS>
impl<const MAX_POINTS: usize> BlendSpace1D<MAX_POINTS>
pub const fn new() -> BlendSpace1D<MAX_POINTS>
pub const fn new() -> BlendSpace1D<MAX_POINTS>
Creates an empty 1D blend space.
pub fn add_point(&mut self, param: f32, clip_index: u16) -> bool
pub fn add_point(&mut self, param: f32, clip_index: u16) -> bool
Inserts a point sorted by param. Returns false if capacity is full or param is non-finite.
pub fn add_point_with_speed(
&mut self,
param: f32,
clip_index: u16,
playback_speed: f32,
) -> bool
pub fn add_point_with_speed( &mut self, param: f32, clip_index: u16, playback_speed: f32, ) -> bool
Inserts a point with explicit playback speed multiplier.
pub fn sample_weights(&self, param: f32) -> (u16, u16, f32)
pub fn sample_weights(&self, param: f32) -> (u16, u16, f32)
Computes (clip_a, clip_b, t) for param with zero heap allocation.
Trait Implementations§
§impl<const MAX_POINTS: usize> Clone for BlendSpace1D<MAX_POINTS>
impl<const MAX_POINTS: usize> Clone for BlendSpace1D<MAX_POINTS>
§fn clone(&self) -> BlendSpace1D<MAX_POINTS>
fn clone(&self) -> BlendSpace1D<MAX_POINTS>
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 moreimpl<const MAX_POINTS: usize> Copy for BlendSpace1D<MAX_POINTS>
§impl<const MAX_POINTS: usize> Debug for BlendSpace1D<MAX_POINTS>
impl<const MAX_POINTS: usize> Debug for BlendSpace1D<MAX_POINTS>
§impl<const MAX_POINTS: usize> Default for BlendSpace1D<MAX_POINTS>
impl<const MAX_POINTS: usize> Default for BlendSpace1D<MAX_POINTS>
§fn default() -> BlendSpace1D<MAX_POINTS>
fn default() -> BlendSpace1D<MAX_POINTS>
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl<const MAX_POINTS: usize> Freeze for BlendSpace1D<MAX_POINTS>
impl<const MAX_POINTS: usize> RefUnwindSafe for BlendSpace1D<MAX_POINTS>
impl<const MAX_POINTS: usize> Send for BlendSpace1D<MAX_POINTS>
impl<const MAX_POINTS: usize> Sync for BlendSpace1D<MAX_POINTS>
impl<const MAX_POINTS: usize> Unpin for BlendSpace1D<MAX_POINTS>
impl<const MAX_POINTS: usize> UnsafeUnpin for BlendSpace1D<MAX_POINTS>
impl<const MAX_POINTS: usize> UnwindSafe for BlendSpace1D<MAX_POINTS>
Blanket Implementations§
§impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
Aggregate shares in an MPC protocol.
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§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> ⓘ
Converts
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> ⓘ
Converts
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> NoneValue for Twhere
T: Default,
impl<T> NoneValue for Twhere
T: Default,
type NoneType = T
§fn null_value() -> T
fn null_value() -> T
The none-equivalent value.