FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    OrbitAnimation

    struct · ferroui-xaml-behaviors-animations · v0.5.0

    struct OrbitAnimation
    

    Maintains and applies a composition orientation for an orbit-style pointer interaction.

    Deviation (DEVIATIONS.md, Behaviors): the orientation (a property with a private setter in the reference) is kept in a cell, so that rotate and reset take &self as the methods of the reference's class do.

    View source

    Members

    new

    fn new() -> Self
    

    Creates an orbit animation at the identity orientation.

    Source

    orientation

    fn orientation(self: &Self) -> Quaternion
    

    Gets the current orientation.

    Source

    calculate_orientation

    fn calculate_orientation(orientation: Quaternion, pointer_delta: Vector, sensitivity: f64) -> Quaternion
    

    Calculates the next normalized orientation from the current orientation and the pointer movement since the previous update; sensitivity is the rotation sensitivity.

    Source

    rotate

    fn rotate(self: &Self, target: Option<&Control>, pointer_delta: Vector, sensitivity: f64) -> bool
    

    Updates the orientation and applies it to a control's composition visual. Returns true when a composition visual was animated; otherwise, false.

    Source

    update_center_point

    fn update_center_point(target: Option<&Control>) -> bool
    

    Updates a control's composition center point from its current bounds. Returns true when a composition visual was updated; otherwise, false.

    Source

    reset

    fn reset(self: &Self)
    

    Resets the maintained orientation to the identity quaternion.

    Source

    Trait implementations

    • Send
    • Sync
    • Freeze
    • UnsafeUnpin
    • Unpin
    • UnwindSafe
    • RefUnwindSafe
    • Borrow<T>
    • BorrowMut<T>
    • Into<U>
    • From<T>
    • TryInto<U>
    • TryFrom<U>
    • Any
    • ClassDefaults
    • ErasedDestructor
    • IntoEither
    • Debug
    • Default

    Availability

    Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.