Struct goshawk::ZoomSettings[][src]

pub struct ZoomSettings {
    pub angle_range: RangeInclusive<f32>,
    pub angle_change_zone: RangeInclusive<f32>,
    pub distance_range: RangeInclusive<f32>,
    pub velocity: f32,
    pub max_velocity: f32,
    pub scroll_accel: f32,
    pub keyboard_accel: f32,
    pub idle_deceleration: f32,
    pub zoom_in_keys: Cow<'static, [KeyCode]>,
    pub zoom_out_keys: Cow<'static, [KeyCode]>,
}

Fields

angle_range: RangeInclusive<f32>

The minimum and maximum angle in radians from the target

angle_change_zone: RangeInclusive<f32>

At the minimum distance, the angle to the target will be equal to min_angle, and vice versa. In other words, at these points the camera will only zoom in or out rather than also changing its angle - the angle only changes within this distance zone.

distance_range: RangeInclusive<f32>

The minimum and maximum distance from the target

velocity: f32

The current velocity at which the camera is zooming in or out

max_velocity: f32

The maximum velocity at which the camera can zoom in or out

scroll_accel: f32

The acceleration which the scroll wheel applies to the camera zoom while scrolling. Note that because of the discrete way in which scroll events are sent to the application, the delta time is not multiplied to the scroll accel value before it is added to the velocity. Therefore, this acts as the change in velocity per line or pixel scrolled, rather than the acceleration applied over a second of input.

keyboard_accel: f32

The acceleration which the keyboard applies to the camera zoom while scrolling

idle_deceleration: f32

The deceleration of the camera zoom while nothing is causing it to zoom in or out

zoom_in_keys: Cow<'static, [KeyCode]>

Keys which will cause the camera to zoom in

zoom_out_keys: Cow<'static, [KeyCode]>

Keys which will cause the camera to zoom out

Implementations

impl ZoomSettings[src]

pub const fn new() -> Self[src]

Trait Implementations

impl Clone for ZoomSettings[src]

impl Debug for ZoomSettings[src]

impl Default for ZoomSettings[src]

impl PartialEq<ZoomSettings> for ZoomSettings[src]

impl StructuralPartialEq for ZoomSettings[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Any for T where
    T: Any

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> CloneAny for T where
    T: Clone + Any

impl<T> Component for T where
    T: 'static + Send + Sync

impl<T> Downcast for T where
    T: Any

impl<T> DowncastSync for T where
    T: Send + Sync + Any

impl<T> From<T> for T[src]

impl<T> FromResources for T where
    T: Default

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Resource for T where
    T: 'static + Send + Sync

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> TypeData for T where
    T: 'static + Send + Sync + Clone

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,