pub struct FirstPersonSettings<T = f32> {
    pub move_forward_button: Button,
    pub move_backward_button: Button,
    pub strafe_left_button: Button,
    pub strafe_right_button: Button,
    pub fly_up_button: Button,
    pub fly_down_button: Button,
    pub move_faster_button: Button,
    pub speed_horizontal: T,
    pub speed_vertical: T,
    pub mouse_sensitivity_horizontal: T,
    pub mouse_sensitivity_vertical: T,
}
Expand description

First person camera settings.

Fields§

§move_forward_button: Button

Which button to press to move forward.

§move_backward_button: Button

Which button to press to move backward.

§strafe_left_button: Button

Which button to press to strafe left.

§strafe_right_button: Button

Which button to press to strafe right.

§fly_up_button: Button

Which button to press to fly up.

§fly_down_button: Button

Which button to press to fly down.

§move_faster_button: Button

Which button to press to move faster.

§speed_horizontal: T

The horizontal movement speed.

This is measured in units per second.

§speed_vertical: T

The vertical movement speed.

This is measured in units per second.

§mouse_sensitivity_horizontal: T

The horizontal mouse sensitivity.

This is a multiplier applied to horizontal mouse movements.

§mouse_sensitivity_vertical: T

The vertical mouse sensitivity.

This is a multiplier applied to vertical mouse movements.

Implementations§

source§

impl<T> FirstPersonSettings<T>where T: Float,

source

pub fn keyboard_wasd() -> FirstPersonSettings<T>

Creates new first person camera settings with wasd defaults.

source

pub fn keyboard_esdf() -> FirstPersonSettings<T>

Creates a new first person camera settings with esdf defaults.

source

pub fn keyboard_zqsd() -> FirstPersonSettings<T>

Creates new first person camera settings with zqsd defaults (azerty keyboard layout).

Auto Trait Implementations§

§

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

§

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

§

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

§

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

§

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

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.