pub struct MotionScalarSample { /* private fields */ }Expand description
A sampled point on a scalar motion model.
Implementations§
Source§impl MotionScalarSample
impl MotionScalarSample
Sourcepub const fn new(
state: MotionRunState,
elapsed: Duration,
value: f32,
velocity: f32,
target: f32,
) -> Self
pub const fn new( state: MotionRunState, elapsed: Duration, value: f32, velocity: f32, target: f32, ) -> Self
Creates a scalar motion sample from explicit values.
Sourcepub const fn state(self) -> MotionRunState
pub const fn state(self) -> MotionRunState
Returns the sampled state.
Sourcepub const fn is_active(self) -> bool
pub const fn is_active(self) -> bool
Returns whether callers should continue requesting frames.
Sourcepub const fn reached_final_state(self) -> bool
pub const fn reached_final_state(self) -> bool
Returns whether the semantic final state has been reached.
Trait Implementations§
Source§impl Clone for MotionScalarSample
impl Clone for MotionScalarSample
impl Copy for MotionScalarSample
Source§impl Debug for MotionScalarSample
impl Debug for MotionScalarSample
Source§impl PartialEq for MotionScalarSample
impl PartialEq for MotionScalarSample
impl StructuralPartialEq for MotionScalarSample
Auto Trait Implementations§
impl Freeze for MotionScalarSample
impl RefUnwindSafe for MotionScalarSample
impl Send for MotionScalarSample
impl Sync for MotionScalarSample
impl Unpin for MotionScalarSample
impl UnsafeUnpin for MotionScalarSample
impl UnwindSafe for MotionScalarSample
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