Struct OrbitZoomCameraSettings

Source
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§

§

impl<T> Freeze for OrbitZoomCameraSettings<T>
where T: Freeze,

§

impl<T> RefUnwindSafe for OrbitZoomCameraSettings<T>
where T: RefUnwindSafe,

§

impl<T> Send for OrbitZoomCameraSettings<T>
where T: Send,

§

impl<T> Sync for OrbitZoomCameraSettings<T>
where T: Sync,

§

impl<T> Unpin for OrbitZoomCameraSettings<T>
where T: Unpin,

§

impl<T> UnwindSafe for OrbitZoomCameraSettings<T>
where T: UnwindSafe,

Blanket Implementations§

Source§

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

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

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

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where 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 T
where 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 T
where U: Into<T>,

Source§

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 T
where U: TryFrom<T>,

Source§

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.