Struct bevy::input::gamepad::GamepadRumbleIntensity
source · pub struct GamepadRumbleIntensity {
pub strong_motor: f32,
pub weak_motor: f32,
}
Expand description
The intensity at which a gamepad’s force-feedback motors may rumble.
Fields§
§strong_motor: f32
The rumble intensity of the strong gamepad motor.
Ranges from 0.0
to 1.0
.
By convention, this is usually a low-frequency motor on the left-hand side of the gamepad, though it may vary across platforms and hardware.
weak_motor: f32
The rumble intensity of the weak gamepad motor.
Ranges from 0.0
to 1.0
.
By convention, this is usually a high-frequency motor on the right-hand side of the gamepad, though it may vary across platforms and hardware.
Implementations§
source§impl GamepadRumbleIntensity
impl GamepadRumbleIntensity
sourcepub const MAX: GamepadRumbleIntensity = _
pub const MAX: GamepadRumbleIntensity = _
Rumble both gamepad motors at maximum intensity.
sourcepub const WEAK_MAX: GamepadRumbleIntensity = _
pub const WEAK_MAX: GamepadRumbleIntensity = _
Rumble the weak motor at maximum intensity.
sourcepub const STRONG_MAX: GamepadRumbleIntensity = _
pub const STRONG_MAX: GamepadRumbleIntensity = _
Rumble the strong motor at maximum intensity.
sourcepub const fn weak_motor(intensity: f32) -> GamepadRumbleIntensity
pub const fn weak_motor(intensity: f32) -> GamepadRumbleIntensity
Creates a new rumble intensity with weak motor intensity set to the given value.
Clamped within the 0.0
to 1.0
range.
sourcepub const fn strong_motor(intensity: f32) -> GamepadRumbleIntensity
pub const fn strong_motor(intensity: f32) -> GamepadRumbleIntensity
Creates a new rumble intensity with strong motor intensity set to the given value.
Clamped within the 0.0
to 1.0
range.
Trait Implementations§
source§impl Clone for GamepadRumbleIntensity
impl Clone for GamepadRumbleIntensity
source§fn clone(&self) -> GamepadRumbleIntensity
fn clone(&self) -> GamepadRumbleIntensity
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for GamepadRumbleIntensity
impl Debug for GamepadRumbleIntensity
source§impl PartialEq for GamepadRumbleIntensity
impl PartialEq for GamepadRumbleIntensity
source§fn eq(&self, other: &GamepadRumbleIntensity) -> bool
fn eq(&self, other: &GamepadRumbleIntensity) -> bool
self
and other
values to be equal, and is used
by ==
.impl Copy for GamepadRumbleIntensity
impl StructuralPartialEq for GamepadRumbleIntensity
Auto Trait Implementations§
impl RefUnwindSafe for GamepadRumbleIntensity
impl Send for GamepadRumbleIntensity
impl Sync for GamepadRumbleIntensity
impl Unpin for GamepadRumbleIntensity
impl UnwindSafe for GamepadRumbleIntensity
Blanket Implementations§
source§impl<T, U> AsBindGroupShaderType<U> for T
impl<T, U> AsBindGroupShaderType<U> for T
source§fn as_bind_group_shader_type(&self, _images: &RenderAssets<Image>) -> U
fn as_bind_group_shader_type(&self, _images: &RenderAssets<Image>) -> U
T
ShaderType
for self
. When used in AsBindGroup
derives, it is safe to assume that all images in self
exist.source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.