pub struct AnchoredMomentum {
pub velocity: Option<f64>,
pub anchor: Option<ScreenPoint>,
pub decay: MomentumDecay,
pub snap: Option<MomentumSnap>,
}Expand description
How a gesture’s zoom, bearing, or pitch keeps changing after release.
See mln_anchored_momentum in the
C API reference.
Fields§
§velocity: Option<f64>How fast the value changed at release: zoom levels per second for zoom, and degrees per second for bearing and pitch. The part moves only when this is set.
anchor: Option<ScreenPoint>The screen point that the change keeps in place. Without one, the change keeps the center of the view in place.
decay: MomentumDecay§snap: Option<MomentumSnap>Where the part settles. Without this, it stays where the gesture and its glide leave it.
Trait Implementations§
Source§impl Clone for AnchoredMomentum
impl Clone for AnchoredMomentum
Source§fn clone(&self) -> AnchoredMomentum
fn clone(&self) -> AnchoredMomentum
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 Copy for AnchoredMomentum
Source§impl Debug for AnchoredMomentum
impl Debug for AnchoredMomentum
Source§impl Default for AnchoredMomentum
impl Default for AnchoredMomentum
Source§fn default() -> AnchoredMomentum
fn default() -> AnchoredMomentum
Returns the “default value” for a type. Read more
Source§impl PartialEq for AnchoredMomentum
impl PartialEq for AnchoredMomentum
impl StructuralPartialEq for AnchoredMomentum
Auto Trait Implementations§
impl Freeze for AnchoredMomentum
impl RefUnwindSafe for AnchoredMomentum
impl Send for AnchoredMomentum
impl Sync for AnchoredMomentum
impl Unpin for AnchoredMomentum
impl UnsafeUnpin for AnchoredMomentum
impl UnwindSafe for AnchoredMomentum
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> ErasedDestructor for Twhere
T: 'static,
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