pub struct OrbitZoomCameraSettings<T = f32> {
    pub orbit_button: Button,
    pub zoom_button: Button,
    pub pan_button: Button,
    pub orbit_speed: T,
    pub pitch_speed: T,
    pub pan_speed: T,
    pub zoom_speed: T,
}
Expand description

Specifies key bindings and speed modifiers for OrbitZoomCamera

Fields§

§orbit_button: Button

Which button to press to orbit with mouse

§zoom_button: Button

Which button to press to zoom with mouse

§pan_button: Button

Which button to press to pan with mouse

§orbit_speed: T

Modifier for orbiting speed (arbitrary unit)

§pitch_speed: T

Modifier for pitch speed relative to orbiting speed (arbitrary unit). To reverse pitch direction, set this to -1.

§pan_speed: T

Modifier for panning speed (arbitrary unit)

§zoom_speed: T

Modifier for zoom speed (arbitrary unit)

Implementations§

source§

impl<T: Float> OrbitZoomCameraSettings<T>

source

pub fn default() -> OrbitZoomCameraSettings<T>

Clicking and dragging OR two-finger scrolling will orbit camera, with LShift as pan modifer and LCtrl as zoom modifier

source

pub fn orbit_button(self, button: Button) -> OrbitZoomCameraSettings<T>

Set the button for orbiting

source

pub fn zoom_button(self, button: Button) -> OrbitZoomCameraSettings<T>

Set the button for zooming

source

pub fn pan_button(self, button: Button) -> OrbitZoomCameraSettings<T>

Set the button for panning

source

pub fn orbit_speed(self, s: T) -> OrbitZoomCameraSettings<T>

Set the orbit speed modifier

source

pub fn pitch_speed(self, s: T) -> OrbitZoomCameraSettings<T>

Set the pitch speed modifier

source

pub fn pan_speed(self, s: T) -> OrbitZoomCameraSettings<T>

Set the pan speed modifier

source

pub fn zoom_speed(self, s: T) -> OrbitZoomCameraSettings<T>

Set the zoom speed modifier

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

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

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.